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!)
A137809 a(0) = a(1) = 1. a(n) = a(n-1) + a(n - b(n)), where b(n) is largest prime dividing n. 2

%I #19 Aug 11 2018 11:36:13

%S 1,1,2,3,5,6,9,10,19,28,34,35,63,64,74,108,182,183,291,292,400,474,

%T 509,510,984,1384,1448,2432,2906,2907,4291,4292,8583,9092,9275,12181,

%U 21273,21274,21566,23014,35195,35196,47377,47378,56470,91665,92175,92176

%N a(0) = a(1) = 1. a(n) = a(n-1) + a(n - b(n)), where b(n) is largest prime dividing n.

%H Iain Fox, <a href="/A137809/b137809.txt">Table of n, a(n) for n = 0..10000</a> (first 101 terms from James A. Sellers)

%F a(p) = a(p-1) + 1, for p prime. - _Michel Marcus_, Aug 11 2018

%p with(numtheory): a:=proc(n) option remember: if n = 0 or n = 1 then RETURN(1) fi: a(n-1) + a(n-ifactors(n)[2][nops(ifactors(n)[2])][1]): end: for i from 0 to 100 do printf(`%d,`, a(i)) od: # _James A. Sellers_, Feb 18 2008

%t a = {1, 1}; Do[AppendTo[a, a[[ -1]] + a[[n - FactorInteger[n][[ -1, 1]] + 1]]], {n, 2, 70}]; a (* _Stefan Steinerberger_, Feb 14 2008 *)

%o (PARI) first(n) = my(res=vector(n)); res[1]=res[2]=1; for(x=3, n, res[x] = res[x-1] + res[x-vecmax(factor(x-1)[, 1])]); res \\ _Iain Fox_, Aug 11 2018

%Y Cf. A006530, A137808.

%K nonn

%O 0,3

%A _Leroy Quet_, Feb 11 2008

%E More terms from _Stefan Steinerberger_, Feb 14 2008

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 00:30 EDT 2024. Contains 371917 sequences. (Running on oeis4.)