login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A246366 Permutation of natural numbers: a(n) = A005941(A227413(n)). 5
1, 2, 4, 3, 6, 9, 7, 5, 8, 33, 12, 65, 18, 257, 16, 17, 10, 129, 11, 4097, 34, 2049, 19, 65537, 15, 8193, 24, 4194305, 21, 32769, 66, 1025, 20, 513, 14, 262145, 22, 16385, 13, 1099511627777, 1026, 2097153, 130, 68719476737, 30, 1048577, 35, 288230376151711745, 8194, 67108865, 40, 4398046511105, 2050, 8388609, 28 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Maps even numbers to terms of A000051 (2^n + 1) in some order.

LINKS

Antti Karttunen, Table of n, a(n) for n = 1..95

Index entries for sequences that are permutations of the natural numbers

FORMULA

a(n) = A005941(A227413(n)) = 1 + A156552(A227413(n)).

PROG

(PARI)

default(primelimit, (2^31)+(2^30));

A002808(n) = { my(k=-1); while( -n + n += -k + k=primepi(n), ); n }; \\ This function from M. F. Hasler

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)};

A156552(n) = if(1==n, 0, if(!(n%2), 1+(2*A156552(n/2)), 2*A156552(A064989(n))));

A005941(n) = A156552(n)+1;

A227413(n) = if(1==n, 1, if(!(n%2), prime(A227413(n/2)), A002808(A227413((n-1)/2))));

A246366(n) = A005941(A227413(n));

for(n=1, 95, write("b246366.txt", n, " ", A246366(n)));

(Scheme) (define (A246368 n) (A227413 (A005941 n)))

CROSSREFS

Inverse: A246365.

Related or similar permutations: A005941, A156552, A227413, A246364, A246368.

Cf. A000051.

Sequence in context: A255127 A083221 A246278 * A271865 A075652 A054428

Adjacent sequences:  A246363 A246364 A246365 * A246367 A246368 A246369

KEYWORD

nonn

AUTHOR

Antti Karttunen, Aug 26 2014

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 26 22:42 EDT 2019. Contains 321565 sequences. (Running on oeis4.)