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!)
A323081 Lexicographically earliest such sequence a that for all i, j, a(i) = a(j) => f(i) = f(j), where f(p) = -(p mod 4) for primes p, and f(n) = A252463(n) for any other numbers. 3

%I #7 Jan 04 2019 09:05:24

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

%T 18,3,19,17,20,18,21,5,22,23,24,5,25,3,23,15,26,3,27,28,28,29,29,5,30,

%U 25,31,32,33,3,34,5,35,24,36,37,37,3,32,38,39,3,40,5,41,21,38,39,42,3,43,19,44,3,45,42,46,47,48,5,49,50,47,51,52,53,54,5,55,31,56,5,53,3,57,34

%N Lexicographically earliest such sequence a that for all i, j, a(i) = a(j) => f(i) = f(j), where f(p) = -(p mod 4) for primes p, and f(n) = A252463(n) for any other numbers.

%C For all i, j:

%C A319704(i) = A319704(j) => a(i) = a(j) => A322805(i) = A322805(j).

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

%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 A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};

%o A252463(n) = if(!(n%2),n/2,A064989(n));

%o A323081aux(n) = if(isprime(n),-(n%4),A252463(n));

%o v323081 = rgs_transform(vector(up_to,n,A323081aux(n)));

%o A323081(n) = v323081[n];

%Y Cf. A292583, A319704, A322805, A323080.

%K nonn

%O 1,2

%A _Antti Karttunen_, Jan 03 2019

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