login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A271441 a(1) = 2; if gpf(a(n-1)) <= n-1 then a(n) = a(n-1) + a(gpf(a(n-1))), else a(n) = a(n-1) + 1, where gpf(m) is the greatest prime factor of m. 1

%I

%S 2,3,4,7,8,11,12,16,19,20,28,40,48,52,100,108,112,124,125,133,258,259,

%T 260,308,336,348,349,350,362,363,391,651,1042,1043,1044,1406,1407,

%U 1408,1436,1437,1438,1439,1440,1448,1449,1709,1710,1835,1836,1948

%N a(1) = 2; if gpf(a(n-1)) <= n-1 then a(n) = a(n-1) + a(gpf(a(n-1))), else a(n) = a(n-1) + 1, where gpf(m) is the greatest prime factor of m.

%C Choosing the initial value a(1) = 2 seems to produce the most irregular sequence.

%H Ivan Neretin, <a href="/A271441/b271441.txt">Table of n, a(n) for n = 1..10000</a>

%e Since a(11) = 28, gpf(28) = 7 and a(7) = 12, then a(12) = 28 + 12 = 40.

%t Nest[Append[#, (x = #[[-1]]) + If[(p = FactorInteger[x][[-1, 1]]) <= Length@#, #[[p]], 1]] &, {2}, 49] (* _Ivan Neretin_, Jan 27 2017 *)

%o (PARI) gpf(n) = if (n==1, 1, vecmax(factor(n)[,1]));

%o lista(nn) = {va = vector(nn); print1(va[1] = 2, ", "); for (n=2, nn, if (gpf(va[n-1]) <= n-1, va[n] = va[n-1] + va[gpf(va[n-1])], va[n] = va[n-1]+1); print1(va[n], ", "););} \\ _Michel Marcus_, Apr 09 2016

%Y Cf. A006530 (gpf).

%K nonn,hear

%O 1,1

%A _Cody M. Haderlie_, Apr 07 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 19 11:42 EST 2022. Contains 350465 sequences. (Running on oeis4.)