login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A362138
a(n) = gpf(a(n-1) + prime(n)) where gpf is the greatest prime factor and a(1)=2.
2
2, 5, 5, 3, 7, 5, 11, 5, 7, 3, 17, 3, 11, 3, 5, 29, 11, 3, 7, 13, 43, 61, 3, 23, 5, 53, 13, 5, 19, 11, 23, 11, 37, 11, 5, 13, 17, 5, 43, 3, 13, 97, 3, 7, 17, 3, 107, 11, 17, 41, 137, 47, 3, 127, 3, 19, 3, 137, 23, 19, 151, 37, 43, 59, 31, 29, 5, 19, 61, 41, 197
OFFSET
1,1
LINKS
Sebastian F. Orellana, Table of n, a(n) for n = 1..10000
EXAMPLE
a(3) = gpf(a(2) + prime(3)) = gpf(5+5) = 5.
MATHEMATICA
gpf[n_] := FactorInteger[n][[-1, 1]]; a[1] = 2; a[n_] := a[n] = gpf[a[n - 1] + Prime[n]]; Array[a, 100] (* Amiram Eldar, Jun 15 2023 *)
PROG
(Python)
from sympy import factorint, prime
list=[2]
num=1
k=50
for i in range(0, k):
list.append(max(factorint(list[i]+prime(i+1))))
print(list)
CROSSREFS
Cf. A006530 (gpf), A000040.
Sequence in context: A074250 A161013 A115522 * A190283 A272414 A194367
KEYWORD
nonn
AUTHOR
STATUS
approved