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!)
A256908 Initialization a(n)=0 for all n; if a(n)=0, a(n+kp)=n where p=prime(n) and k=0,1,2,... 1

%I #6 Apr 16 2015 06:27:35

%S 1,2,1,4,1,6,1,2,1,10,1,12,1,2,1,5,1,3,1,2,1,22,1,7,1,2,1,3,1,30,1,2,

%T 1,34,1,36,1,2,1,40,1,11,1,2,1,4,1,3,1,2,1,52,1,13,1,2,1,3,1,4,1,2,1,

%U 64,1,66,1,2,1,70,1,72,1,2,1,17,1,3,1,2,1,5

%N Initialization a(n)=0 for all n; if a(n)=0, a(n+kp)=n where p=prime(n) and k=0,1,2,...

%C Conjecture: there is an infinity of numbers n such that a(n)=n.

%H Michel Lagneau, <a href="/A256908/b256908.txt">Table of n, a(n) for n = 1..10000</a>

%e n=1 => prime(1)=2 and a(1+2k)=1 => a(1)=a(3)=a(5)=... =1;

%e n=2 => prime(2)=3 and a(2+3k)=2 => a(2)=a(8)=... =2 (the element a(5) is already in the sequence);

%e n=3 => prime(3)=5 and a(3+5k)=3 => a(18)=3 (the elements a(n) for n<18 are already in the sequence), a(28)=3, a(48)=3,...

%p with(numtheory):nn:=500:T:=array(1..nn):

%p for i from 1 to nn do:

%p T[i]:=0:

%p od:

%p for n from 1 to nn do:

%p p:=ithprime(n):

%p for m from n by p to nn do:

%p if T[m]=0 then T[m]:=n:

%p else

%p fi:

%p od:

%p od:

%p print(T):

%K nonn

%O 1,2

%A _Michel Lagneau_, Apr 12 2015

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 19 11:31 EDT 2024. Contains 371792 sequences. (Running on oeis4.)