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!)
A112479 a(n) = 1 + sum{p=primes<n, p does not divide n} a(p). 1
1, 1, 2, 3, 4, 5, 8, 15, 14, 11, 16, 29, 32, 55, 58, 63, 64, 125, 128, 251, 246, 239, 256, 509, 508, 479, 510, 503, 512, 1017, 1024, 2047, 2030, 1983, 2036, 2045, 2048, 3967, 4062, 4091, 4096, 8181, 8192, 16367, 16378, 16127, 16384, 32765, 32760, 32763 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
a(prime(k)) = 2^(k-1). - Ivan Neretin, May 01 2016
LINKS
EXAMPLE
a(9) = 1 + a(2) + a(5) + a(7), since 2, 5 and 7 are the primes < 9 and coprime to 9. So a(9) = 1 + 1 + 4 + 8
= 14.
MATHEMATICA
f[l_] := Block[{n}, n = Length[l] + 1; Return[Append[l, 1 + Plus @@ l[[Select[Range[n - 1], PrimeQ[ # ] && Mod[n, # ] > 0 &]]]]]; ]; Nest[f, {1}, 50] (* Ray Chandler, Dec 26 2005 *)
PROG
(PARI) a(n)=if(n<7, max(n-1, 1), my(s=1); forprime(p=2, n-1, if(n%p, s+=a(p))); s) \\ Charles R Greathouse IV, May 02 2016
CROSSREFS
Sequence in context: A140294 A108014 A075721 * A333264 A247461 A281303
KEYWORD
nonn
AUTHOR
Leroy Quet, Dec 13 2005
EXTENSIONS
Extended by Ray Chandler, Dec 26 2005
STATUS
approved

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 23 14:32 EDT 2024. Contains 371914 sequences. (Running on oeis4.)