cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A269848 a(1) = 1, a(2n) = A065090(1+a(n)), a(2n+1) = A000040(a(A064989(2n+1))).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 11, 8, 7, 9, 31, 10, 127, 18, 13, 14, 709, 12, 5381, 15, 23, 45, 52711, 16, 17, 165, 19, 27, 648391, 21, 9737333, 22, 61, 856, 41, 20, 174440041, 6185, 197, 24, 3657500101, 34, 88362852307, 63, 29, 58644, 2428095424619, 25, 59, 26, 977, 212
Offset: 1

Views

Author

Antti Karttunen, Mar 06 2016

Keywords

Comments

Term a(47) manually copied from A007097(15). Note that A000040(15) = 47.

Crossrefs

Inverse: A269847.
Related or similar permutations: A237739, A243071, A246682, A269858.

Programs

  • PARI
    allocatemem(2^30);
    default(primelimit,4294965247);
    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)};
    A269848 = n -> if(n<=2,n,if((n%2),prime(A269848(A064989(n))),A002808(A269848(n/2)-1)));
    for(n=1, 52, t = A269848(n); print1(t,", "); write("b269848.txt", n, " ", t));
    
  • Scheme
    ;; With memoization-macro definec.
    (definec (A269848 n) (cond ((<= n 1) n) ((even? n) (A065090 (+ 1 (A269848 (/ n 2))))) (else (A000040 (A269848 (A064989 n))))))

Formula

a(1) = 1, a(2) = 2, for n > 2, if n is even, a(n) = A002808(a(n/2)-1), and for odd n, a(n) = A000040(a(A064989(n))).
As a composition of other permutations:
a(n) = A237739(A243071(n)).
Other identities. For all n >= 1:
a(A000040(n)) = A007097(n). [Maps primes to the primeth recurrence.]

A269857 Permutation of natural numbers: a(1) = 1; if n is an odd prime, a(n) = A250469(a(A026233(n))), else a(n) = 2*(a(A026233(n))).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 9, 8, 10, 12, 7, 18, 15, 16, 20, 24, 25, 14, 21, 36, 30, 32, 27, 40, 48, 50, 28, 42, 33, 72, 11, 60, 64, 54, 80, 96, 51, 100, 56, 84, 35, 66, 45, 144, 22, 120, 57, 128, 108, 160, 192, 102, 69, 200, 112, 168, 70, 132, 49, 90, 39, 288, 44, 240, 114, 256, 55, 216, 320, 384, 105, 204, 87, 138, 400
Offset: 1

Views

Author

Antti Karttunen, Mar 06 2016

Keywords

Crossrefs

Inverse: A269858.
Related or similar permutations: A071574, A252755, A269847.
Differs from A269847 for the first time at n=19, where a(19)=21, while A269847(19)=27.

Formula

a(1) = 1; if n is an odd prime, a(n) = A250469(a(A026233(n))), else a(n) = 2*(a(A026233(n))).
As a composition of other permutations:
a(n) = A252755(A071574(n)).
Showing 1-2 of 2 results.