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!)
A322810 Lexicographically earliest such sequence a that a(i) = a(j) => f(i) = f(j) for all i, j, where f(n) = 0 if n is an odd squarefree number > 1, and f(n) = n for all other numbers. 4

%I #9 Dec 27 2018 17:35:39

%S 1,2,3,4,3,5,3,6,7,8,3,9,3,10,3,11,3,12,3,13,3,14,3,15,16,17,18,19,3,

%T 20,3,21,3,22,3,23,3,24,3,25,3,26,3,27,28,29,3,30,31,32,3,33,3,34,3,

%U 35,3,36,3,37,3,38,39,40,3,41,3,42,3,43,3,44,3,45,46,47,3,48,3,49,50,51,3,52,3,53,3,54,3,55,3,56,3,57,3,58,3,59,60,61,3,62,3,63,3

%N Lexicographically earliest such sequence a that a(i) = a(j) => f(i) = f(j) for all i, j, where f(n) = 0 if n is an odd squarefree number > 1, and f(n) = n for all other numbers.

%C For all i, j:

%C A305801(i) = A305801(j) => a(i) = a(j),

%C a(i) = a(j) => A305980(i) = A305980(j),

%C a(i) = a(j) => A322808(i) = A322808(j).

%H Antti Karttunen, <a href="/A322810/b322810.txt">Table of n, a(n) for n = 1..65537</a>

%F a(1) = 1, a(2) = 2, for n > 2, if n is an odd squarefree number (in A056911), a(n) = 3, otherwise a(n) = running count from 4 onward.

%o (PARI)

%o up_to = 65537;

%o rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };

%o A322810aux(n) = if((n>1)&&(n%2)&&issquarefree(n),0,n);

%o v322810 = rgs_transform(vector(up_to,n,A322810aux(n)));

%o A322810(n) = v322810[n];

%Y Cf. A305801, A305980, A322808.

%Y Cf. A056911 (after the initial 1, gives the positions of 3's in this sequence).

%K nonn

%O 1,2

%A _Antti Karttunen_, Dec 27 2018

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 July 14 02:38 EDT 2024. Contains 374291 sequences. (Running on oeis4.)