The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A059964 a(1) = 1, a(2) = 1, a(n) = a(n-p) + a((n+1)-p), n > 2, where p is the largest prime less than n. 0

%I #8 Jan 11 2020 17:26:26

%S 1,1,2,2,3,2,3,2,3,4,5,2,3,2,3,4,5,2,3,2,3,4,5,2,3,4,5,5,5,2,3,2,3,4,

%T 5,5,5,2,3,4,5,2,3,2,3,4,5,2,3,4,5,5,5,2,3,4,5,5,5,2,3,2,3,4,5,5,5,2,

%U 3,4,5,2,3,2,3,4,5,5,5,2,3,4,5,2,3,4,5,5,5,2,3,4,5,5,5,5,5,2,3,4,5,2,3,2,3

%N a(1) = 1, a(2) = 1, a(n) = a(n-p) + a((n+1)-p), n > 2, where p is the largest prime less than n.

%e a(16) = a(16-13) + a(17-13) = a(3) + a(4) = 2 + 2 = 4.

%p with(numtheory): a := proc(n) option remember: if n <= 2 and n >=1 then RETURN(1) fi: a(n-prevprime(n))+ a(n+1-prevprime(n)): end: for n from 1 to 250 do printf(`%d,`,a(n)) od:

%K nonn

%O 1,3

%A Brian Wallace (wallacebrianedward(AT)yahoo.co.uk), Mar 04 2001

%E More terms from _James A. Sellers_, Mar 15 2001

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 June 9 23:33 EDT 2024. Contains 373251 sequences. (Running on oeis4.)