Displaying 1-10 of 12 results found.
a(1) = 2; a(n) is smallest prime > 2*a(n-1).
+10
34
2, 5, 11, 23, 47, 97, 197, 397, 797, 1597, 3203, 6421, 12853, 25717, 51437, 102877, 205759, 411527, 823117, 1646237, 3292489, 6584983, 13169977, 26339969, 52679969, 105359939, 210719881, 421439783, 842879579, 1685759167, 3371518343
COMMENTS
It appears that lim_{n->infinity} a(n)/2^n exists and is approximately 1.569985585.... - Franklin T. Adams-Watters, Nov 11 2011
MAPLE
A055496 := proc(n) option remember; if n=1 then 2 else nextprime(2* A055496(n-1)); fi; end;
MATHEMATICA
NextPrim[n_Integer] := Block[ {k = n + 1}, While[ !PrimeQ[k], k++ ]; Return[k]]; a[1] = 2; a[n_] := NextPrim[ 2*a[n - 1]]; Table[ a[n], {n, 1, 31} ]
a[1]=2; a[n_]:=a[n]=Prime[PrimePi[2*a[n-1]]+1]; Table[a[n], {n, 40}] (* Zak Seidov, Feb 16 2006 *)
NestList[ NextPrime[2*# ]&, 2, 100] (* Zak Seidov, Jul 28 2009 *)
a(1)=3; for n > 1, a(n) = 1 + a(n-1) + gcd( a(n-1)*(a(n-1)+2), A073829(a(n-1)) ).
+10
11
3, 19, 39, 81, 165, 333, 335, 673, 1347, 1349, 1351, 1353, 1355, 1357, 1359, 2721, 2723, 2725, 2727, 5457, 5459, 5461, 5463, 5465, 5467, 5469, 10941, 10943, 10945, 10947, 21897, 21899, 21901, 21903, 21905, 21907, 21909, 43821, 43823, 43825, 43827, 43829, 43831
COMMENTS
A proof follows from Clement's criterion of twin primes.
REFERENCES
E. Trost, Primzahlen, Birkhäuser-Verlag, 1953, pages 30-31.
EXAMPLE
a(2) = 1 + 3 + gcd(3*5, 4*(2! + 1) + 3) = 19.
MAPLE
A073829 := proc(n) n+4*((n-1)!+1) ; end proc:
A167053 := proc(n) option remember ; local aprev; if n = 1 then 3; else aprev := procname(n-1) ; 1+aprev+gcd(aprev*(aprev+2), A073829(aprev)) ; end if; end proc:
MATHEMATICA
a[1] = 3;
a[n_] := a[n] = 1 + a[n-1] + GCD[a[n-1] (a[n-1] + 2), A073829[a[n-1]]];
CROSSREFS
Cf. A166944, A166945, A116533, A163961, A163963, A084662, A084663, A106108, A132199, A134162, A135506, A135508, A118679, A120293.
EXTENSIONS
Definition shortened and values from a(4) on replaced by R. J. Mathar, Dec 17 2009
Sequence of prime gaps which characterize Rowland sequences of prime-generating recurrences.
+10
11
3, 7, 17, 19, 31, 43, 53, 67, 71, 79, 97, 103, 109, 113, 127, 137, 151, 163, 173, 181, 191, 197, 199, 211, 229, 239, 241, 251, 257, 269, 271, 283, 293, 317, 331, 337, 349, 367, 373
COMMENTS
Consider the Rowland sequences with recurrence N(n)= N(n-1)+gcd(n,N(n-1)).
For some of these, like the prototypical A106108, the first differences N(n)-N(n-1) are always 1 or primes.
If for some position p (a prime) N(p-1)=2*p, then the arXiv preprint shows that N is indeed in that class of prime-generating sequences.
Since then N(p)=N(p-1)+p, the prime p characterizes at the same time the gap (first difference) and location in the sequence.
In the same sequence at some larger value of p, we may again have N(p-1)=2*p. In these cases, we put all these p's satisfying that equation into a generator class.
For each of the generator classes, the OEIS sequence shows the smallest member (prime) in that class. So this is a trace of how many essentially different sequences with this N(p-1)=2*p property exist.
EXAMPLE
We put a(1)=3 since the N-sequence 4, 6, 9, 10, 15, 18, 19, 20.. = A084662 (essentially the same as A106108) has a first difference of p=3 at position p-1=2, N(2)=2*3.
It has a first difference of p=5 at p-1=4, a first difference of p=11 at p=10, so we put {3,5,11,23,..} into that class. This leaves p=7=a(2) as the lowest prime to be covered by the next class. This is first realized by N = 8, 10, 11, 12, 13, 14, 21, 22, 23, 24, 25, 26, 39.. = A084663. Here N(12)=2*13, so p=13 is in the same class as p=7, namely {7,13,29,59,131,..}. This leaves p=17=a(3) to be the smallest member in a new class, namely {17,41,83,167,..}.
EXTENSIONS
Edited, a(1) set to 3, 37 replaced by 31, and extended beyond 53 by R. J. Mathar, Dec 17 2009
15, 19, 41, 83, 167, 337, 673, 1361, 2729, 5471, 10949, 21911, 43853, 87719, 175447, 350899, 701819, 1403641, 2807303, 5614657, 11229331, 22458671, 44917381, 89834777, 179669557, 359339171, 718678369
COMMENTS
All terms of the sequence are primes or products of twin primes ( A037074).
CROSSREFS
Cf. A167053, A166944, A166945, A116533, A163961, A163963, A084662, A084663, A106108, A132199, A134162, A135506, A135508, A118679, A120293
a(6) = 14, for n >= 7, a(n) = a(n-1) + gcd(n, a(n-1)).
+10
8
14, 21, 22, 23, 24, 25, 26, 39, 40, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 87, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 177, 180, 181, 182, 189, 190, 195
COMMENTS
For every n >= 7, a(n) - a(n-1) is 1 or prime. This Rowland-like "generator of primes" is different from A106108 (see comment to A167168).
MAPLE
A167170 := proc(n) option remember; if n = 6 then 14; else procname(n-1)+igcd(n, procname(n-1)) ; end if; end proc: seq( A167170(i), i=6..80) ; # R. J. Mathar, Oct 30 2010
MATHEMATICA
RecurrenceTable[{a[n] == a[n - 1] + GCD[n, a[n - 1]], a[6] == 14}, a, {n, 6, 100}] (* G. C. Greubel, Jun 04 2016 *)
nxt[{n_, a_}]:={n+1, a+GCD[a, n+1]}; NestList[nxt, {6, 14}, 60][[All, 2]] (* Harvey P. Dale, Nov 03 2019 *)
PROG
(PARI) first(n)=my(v=vector(n-5)); v[1]=14; for(k=7, n, v[k-5]=v[k-6]+gcd(k, v[k-6])); v \\ Charles R Greathouse IV, Aug 22 2017
CROSSREFS
Cf. A167168, A106108, A132199, A167054, A167053, A166944, A166945, A116533, A163961, A163963, A084662, A084663, A134162, A135506, A135508, A118679, A120293.
a(2)=3, for n>=3, a(n)=a(n-1)+gcd(n, a(n-1)).
+10
8
3, 6, 8, 9, 12, 13, 14, 15, 20, 21, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 44, 45, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 92, 93, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116
COMMENTS
For every n>=3, a(n)-a(n-1) is 1 or prime. This Rowland-like "generator of primes" is different from A106108 and from generators A167168. Generalization: Let p be a prime. Let N(p-1)=p and for n>=p, N(n)=N(n-1)+gcd(n, N(n-1)). Then, for every n>=p, N(n)-N(n-1) is 1 or prime.
MATHEMATICA
RecurrenceTable[{a[n] == a[n - 1] + GCD[n, a[n - 1]], a[2] == 3}, a, {n, 2, 100}] (* G. C. Greubel, Jun 05 2016 *)
CROSSREFS
Cf. A167170, A167168, A106108, A132199, A167054, A167053, A166944, A166945, A116533, A163961, A163963, A084662, A084663, A134162, A135506, A135508, A118679, A120293.
2, 3, 5, 13, 31, 61, 139, 283, 571, 1153, 2311, 4651, 9343, 19141, 38569, 77419, 154873, 310231, 621631, 1243483, 2486971, 4974721
COMMENTS
Conjecture: each term > 3 of the sequence is the greater member of a twin prime pair ( A006512).
Indices of the records are 1, 2, 4, 6, 9, 10, 15, 18, 21, 25, 28, 30, 38, 72, 90, ... [ R. J. Mathar, Nov 05 2009]
One can formulate a similar conjecture without verification of the primality of the terms (see Conjecture 4 in my paper). [ Vladimir Shevelev, Nov 13 2009]
MATHEMATICA
nxt[{n_, a_}] := {n + 1, If[EvenQ[n], a + GCD[n+1, a], a + GCD[n-1, a]]};
A167494 = DeleteCases[Differences[Transpose[NestList[nxt, {1, 2}, 10^7]][[2]]], 1];
Tally[ A167494][[All, 1]] //. {a1___, a2_, a3___, a4_, a5___} /; a4 <= a2 :> {a1, a2, a3, a5} (* Jean-François Alcover, Oct 29 2018, using Harvey P. Dale's code for A167494 *)
CROSSREFS
Cf. A167494, A167493, A167197, A167195, A167170, A167168, A106108, A132199, A167054, A167053, A166944, A166945, A116533, A163961, A163963, A084662, A084663, A134162, A135506, A135508, A118679, A120293.
EXTENSIONS
Simplified the definition to include all records; one term added by R. J. Mathar, Nov 05 2009
a(6) = 7, for n >= 7, a(n) = a(n - 1) + gcd(n, a(n - 1)).
+10
6
7, 14, 16, 17, 18, 19, 20, 21, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 52, 53, 54, 55, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 116, 117, 120, 121, 122, 123, 124, 125, 126, 127, 128
COMMENTS
For every n >= 7, a(n) - a(n - 1) is 1 or prime. This Rowland-like "generator of primes" is different from A106108 (see comment to A167168) and from A167170. Note that, lim sup a(n) / n = 2, while lim sup A106108(n) / n = lim sup A167170(n) / n = 3.
Going up to a million, differences of two consecutive terms of this sequence gives primes about 0.009% of the time. The rest are 1's. [ Alonso del Arte, Nov 30 2009]
MAPLE
A[6]:= 7:
for n from 7 to 100 do A[n]:= A[n-1] + igcd(n, A[n-1]) od:
MATHEMATICA
a[6] = 7; a[n_ /; n > 6] := a[n] = a[n - 1] + GCD[n, a[n - 1]]; Table[a[n], {n, 6, 58}]
PROG
(Python)
from math import gcd
def aupton(nn):
alst = [7]
for n in range(7, nn+1): alst.append(alst[-1] + gcd(n, alst[-1]))
return alst
CROSSREFS
Cf. A167195, A167170, A167168, A106108, A132199, A167054, A167053, A166944, A166945, A116533, A163961, A163963, A084662, A084663, A134162, A135506, A135508, A118679, A120293.
a(1) = 2; thereafter a(n) = a(n-1) + gcd(n, a(n-1)) if n is odd, and a(n) = a(n-1) + gcd(n-2, a(n-1)) if n is even.
+10
5
2, 4, 5, 6, 7, 8, 9, 12, 15, 16, 17, 18, 19, 20, 25, 26, 27, 28, 29, 30, 33, 34, 35, 36, 37, 38, 39, 52, 53, 54, 55, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 124, 125, 126
COMMENTS
Conjectures. 1) For n >= 2, every difference a(n) - a(n-1) is 1 or prime; 2) Every record of differences a(n) - a(n-1) greater than 3 belongs to the sequence of the greater of twin primes ( A006512).
Conjecture #1 above fails at n = 620757, with a(n) = 1241487 and a(n-1) = 1241460, difference = 27. Additionally, the terms of related A167495(m) quickly tend to index n/2. So for example, A167495(14) = 19141 is seen at n = 38284. - Bill McEachen, Jan 20 2023
It seems that, for n > 4, (3*n-3)/2 <= a(n) <= 2n - 3. Can anyone find a proof or disproof? - Charles R Greathouse IV, Jan 22 2023
MATHEMATICA
nxt[{n_, a_}]:={n+1, If[EvenQ[n], a+GCD[n+1, a], a+GCD[n-1, a]]}; Transpose[ NestList[nxt, {1, 2}, 70]][[2]] (* Harvey P. Dale, Dec 05 2015 *)
PROG
(PARI) lista(nn)=my(va = vector(nn)); va[1] = 2; for (n=2, nn, va[n] = if (n%2, va[n-1] + gcd(n, va[n-1]), va[n-1] + gcd(n-2, va[n-1])); ); va; \\ Michel Marcus, Dec 13 2018
(Python)
from math import gcd
from itertools import count, islice
def agen(): # generator of terms
an = 2
for n in count(2):
yield an
an = an + gcd(n, an) if n&1 else an + gcd(n-2, an)
CROSSREFS
Cf. A167197, A167195, A167170, A167168, A106108, A132199, A167054, A167053, A166944, A166945, A116533, A163961, A163963, A084662, A084663, A134162, A135506, A135508, A118679, A120293.
List of first differences of A167493 that are different from 1.
+10
5
2, 3, 3, 5, 3, 13, 5, 3, 31, 61, 7, 5, 3, 7, 139, 5, 3, 283, 5, 3, 571, 7, 5, 3, 1153, 5, 3, 2311, 31, 4651, 17, 5, 13, 3, 3, 5, 3, 9343, 5, 3, 11, 3, 59, 3, 29, 3, 19, 7, 5, 3, 7, 19, 5, 3, 17, 3, 113
COMMENTS
Conjecture. All terms of the sequence are primes.
The conjecture is false: a(144)=27, a(146)=25, a(158)=45, etc., which are composite numbers. - Harvey P. Dale, Dec 05 2015
MATHEMATICA
nxt[{n_, a_}]:={n+1, If[EvenQ[n], a+GCD[n+1, a], a+GCD[n-1, a]]}; DeleteCases[ Differences[ Transpose[NestList[nxt, {1, 2}, 20000]][[2]]], 1] (* Harvey P. Dale, Dec 05 2015 *)
PROG
(PARI) lista(nn) = {my(va = vector(nn)); va[1] = 2; for (n=2, nn, va[n] = if (n%2, va[n-1] + gcd(n, va[n-1]), va[n-1] + gcd(n-2, va[n-1])); ); select(x->(x!=1), vector(nn-1, n, va[n+1] - va[n])); } \\ Michel Marcus, Dec 13 2018
CROSSREFS
Cf. A167493, A167197, A167195, A167170, A167168, A106108, A132199, A167054, A167053, A166944, A166945, A116533, A163961, A163963, A084662, A084663, A134162, A135506, A135508, A118679, A120293.
Search completed in 0.011 seconds
|