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

%I #14 Oct 11 2019 16:45:33

%S 1,1,2,3,4,5,8,15,14,11,16,29,32,55,58,63,64,125,128,251,246,239,256,

%T 509,508,479,510,503,512,1017,1024,2047,2030,1983,2036,2045,2048,3967,

%U 4062,4091,4096,8181,8192,16367,16378,16127,16384,32765,32760,32763

%N a(n) = 1 + sum{p=primes<n, p does not divide n} a(p).

%C a(prime(k)) = 2^(k-1). - _Ivan Neretin_, May 01 2016

%H Ivan Neretin, <a href="/A112479/b112479.txt">Table of n, a(n) for n = 1..1001</a>

%e 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

%e = 14.

%t 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 *)

%o (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

%K nonn

%O 1,3

%A _Leroy Quet_, Dec 13 2005

%E Extended by _Ray Chandler_, Dec 26 2005

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 May 10 20:32 EDT 2024. Contains 372388 sequences. (Running on oeis4.)