|
|
A132199
|
|
Rowland's prime-generating sequence: first differences of A106108.
|
|
27
|
|
|
1, 1, 1, 5, 3, 1, 1, 1, 1, 11, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 23, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 47, 3, 1, 5, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 101, 3, 1, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,4
|
|
COMMENTS
|
Rowland shows that the terms are all 1's or primes.
First appearance of k-th prime, k >= 0: 1, 0, 5, 4, 104, 10, 116, 242878, 242819, 22, 243019, 3891770, 242867, ..., .
The number of different numbers in the first 10^k terms beginning with k=0: 1, 4, 7, 12, 15, 19, 30, >35, ..., .
Records in A132199: 1, 5, 11, 23, 47, 101, 233, 467, 941, 1889, 3779, 7559, 15131, 30323, 60647, 121403, 242807, 486041, 972533, 1945649, 3891467, 7783541, ..., (see A191304). (End)
|
|
REFERENCES
|
Eric S. Rowland, A simple prime-generating recurrence, Abstracts Amer. Math. Soc., 29 (No. 1, 2008), p. 50 (Abstract 1035-11-986).
|
|
LINKS
|
|
|
MAPLE
|
option remember;
if n = 1 then
7;
else
procname(n-1)+igcd(n, procname(n-1)) ;
end if;
end proc:
|
|
MATHEMATICA
|
a[1] = 7; a[n_] := a[n] = a[n - 1] + GCD[n, a[n - 1]]; t = Array[a, 104]; Rest@t - Most@t (* Robert G. Wilson v, Apr 30 2009 *)
|
|
PROG
|
(Haskell)
a132199 n = a132199_list !! (n-1)
a132199_list = zipWith (-) (tail a106108_list) a106108_list
(PARI)
ub=1000; a=7; n=2; while(n<ub, d=gcd(n, a); print1(d, ", "); a=a+d; n=n+1; ); \\ Daniel Constantin Mayer, Aug 31 2014
(Python)
from itertools import count, islice
from math import gcd
def A132199_gen(): # generator of terms
a = 7
for n in count(2):
yield (b:=gcd(a, n))
a += b
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|