The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A112479 a(n) = 1 + sum{p=primes
 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 Ivan Neretin, Table of n, a(n) for n = 1..1001 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 Adjacent sequences:  A112476 A112477 A112478 * A112480 A112481 A112482 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified June 20 23:44 EDT 2021. Contains 345316 sequences. (Running on oeis4.)