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-3 of 3 results.

A254099 Fixed points of A254115 and A254116.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 20, 22, 24, 28, 32, 40, 44, 48, 56, 64, 80, 88, 96, 112, 128, 160, 176, 192, 224, 256, 317, 320, 352, 384, 448, 512, 634, 640, 704, 768, 896, 1024, 1268, 1280, 1408, 1536, 1792, 2048, 2536, 2560, 2816, 3072, 3584, 4096, 5072, 5120, 5632, 6144, 7168, 8192, 10144, 10240, 11264
Offset: 1

Views

Author

Antti Karttunen, Feb 04 2015

Keywords

Comments

If n is a member, then 2n is as well, and vice versa, thus the sequence is completely determined by its odd terms: 1, 3, 5, 7, 11, 317, 15989189, 16964283, ...

Crossrefs

Subsequence: A000079.

Programs

A254116 Permutation of natural numbers: a(n) = A064216(A254103(n)).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 13, 10, 11, 12, 9, 14, 17, 16, 41, 26, 23, 20, 15, 22, 19, 24, 67, 18, 37, 28, 47, 34, 29, 32, 27, 82, 61, 52, 73, 46, 43, 40, 89, 30, 21, 44, 59, 38, 31, 48, 111, 134, 107, 36, 57, 74, 33, 56, 149, 94, 79, 68, 83, 58, 25, 64, 359, 54, 181, 164, 193, 122, 101, 104, 229, 146, 49, 92, 85, 86, 71, 80, 185, 178, 139, 60, 95, 42, 39
Offset: 1

Views

Author

Antti Karttunen, Feb 04 2015

Keywords

Crossrefs

Inverse: A254115.
Fixed points: A254099.
Related permutations: A064216, A254103, A254118.

Programs

  • PARI
    default(primelimit, 2^30);
    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)};
    A064216(n) = A064989((2*n)-1);
    A254103(n) = { if(0==n,0,if(!(n%2),(3*A254103(n/2))-1,(3*(1+A254103((n-1)/2)))\2)); };
    A254116(n) = A064216(A254103(n));
    for(n=1, 8192, write("b254116.txt", n, " ", A254116(n)));
    
  • Python
    from sympy import factorint, prevprime, floor
    from operator import mul
    def a064216(n):
        f=factorint(2*n - 1)
        return 1 if n==1 else reduce(mul, [prevprime(i)**f[i] for i in f])
    def a254103(n):
        if n==0: return 0
        if n%2==0: return 3*a254103(n/2) - 1
        else: return floor((3*(1 + a254103((n - 1)/2)))/2)
    def a(n): return a064216(a254103(n)) # Indranil Ghosh, Jun 06 2017
  • Scheme
    (define (A254116 n) (A064216 (A254103 n)))
    

Formula

a(n) = A064216(A254103(n)).
Other identities. For all n >= 1:
a(n) = a(2n)/2. [Even bisection halved gives back the sequence itself.]
A254118(n) = (a((2*n)+1) - 1)/2. [Likewise, the odd bisection induces A254118.]

A254117 Permutation of natural numbers: a(n) = A254104(A249746(1+n)-1).

Original entry on oeis.org

1, 2, 3, 6, 5, 4, 10, 7, 11, 21, 9, 31, 16, 15, 23, 27, 63, 13, 43, 8, 19, 53, 14, 37, 45, 47, 95, 26, 22, 17, 511, 127, 12, 91, 39, 18, 85, 62, 29, 2047, 30, 38, 111, 20, 54, 75, 42, 55, 157, 35, 46, 174, 25, 79, 24, 59, 77, 303, 123, 94, 78, 167, 87, 223, 61, 103, 699, 191, 41, 107, 183, 125, 431, 28, 71, 84, 60, 93, 110, 767, 51
Offset: 1

Views

Author

Antti Karttunen, Feb 05 2015

Keywords

Crossrefs

Inverse: A254118.
Other related permutations: A249746, A254104, A254115.

Programs

  • Python
    from sympy import factorint, nextprime
    from operator import mul
    def a048673(n):
        f = factorint(n)
        return 1 if n==1 else (1 + reduce(mul, [nextprime(i)**f[i] for i in f]))/2
    def a254104(n):
        if n==0: return 0
        if n%3==0: return 1 + 2*a254104(2*n/3 - 1)
        elif n%3==1: return 1 + 2*a254104(2*(n - 1)/3)
        else: return 2*a254104((n - 2)/3 + 1)
    def a254115(n): return a254104(a048673(n))
    def a(n): return (a254115(2*n + 1) - 1)/2 # Indranil Ghosh, Jun 06 2017

Formula

a(n) = A254104(A249746(1+n)-1).
a(n) = (A254115((2*n)+1)-1) / 2. [Obtained also from the odd bisection of A254115.]
Showing 1-3 of 3 results.