cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A362138 a(n) = gpf(a(n-1) + prime(n)) where gpf is the greatest prime factor and a(1)=2.

This page as a plain text file.
%I A362138 #56 Jun 18 2023 02:21:31
%S A362138 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,
%T A362138 19,11,23,11,37,11,5,13,17,5,43,3,13,97,3,7,17,3,107,11,17,41,137,47,
%U A362138 3,127,3,19,3,137,23,19,151,37,43,59,31,29,5,19,61,41,197
%N A362138 a(n) = gpf(a(n-1) + prime(n)) where gpf is the greatest prime factor and a(1)=2.
%H A362138 Sebastian F. Orellana, <a href="/A362138/b362138.txt">Table of n, a(n) for n = 1..10000</a>
%e A362138 a(3) = gpf(a(2) + prime(3)) = gpf(5+5) = 5.
%t A362138 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 *)
%o A362138 (Python)
%o A362138 from sympy import factorint, prime
%o A362138 list=[2]
%o A362138 num=1
%o A362138 k=50
%o A362138 for i in range(0, k):
%o A362138   list.append(max(factorint(list[i]+prime(i+1))))
%o A362138 print(list)
%Y A362138 Cf. A006530 (gpf), A000040.
%Y A362138 Cf. A076560, A076561.
%K A362138 nonn
%O A362138 1,1
%A A362138 _Sebastian F. Orellana_, Jun 12 2023