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.

A265342 Permutation of even numbers: a(n) = 2 * A265351(n).

Original entry on oeis.org

0, 2, 4, 6, 8, 22, 12, 10, 16, 18, 20, 58, 24, 26, 76, 66, 64, 70, 36, 14, 40, 30, 28, 34, 48, 46, 52, 54, 56, 166, 60, 62, 184, 174, 172, 178, 72, 74, 220, 78, 80, 238, 228, 226, 232, 198, 68, 202, 192, 190, 196, 210, 208, 214, 108, 38, 112, 42, 44, 130, 120, 118, 124, 90, 32, 94, 84, 82, 88, 102, 100, 106, 144
Offset: 0

Views

Author

Antti Karttunen, Dec 07 2015

Keywords

Comments

Iterating this sequence as 1, a(1), a(a(1)), a(a(a(1))), ... yields A264980.

Crossrefs

Cf. A265351.
Cf. also A265341, A263273, A264980.

Programs

  • Python
    from sympy import factorint
    from sympy.ntheory.factor_ import digits
    from operator import mul
    def a030102(n): return 0 if n==0 else int(''.join(map(str, digits(n, 3)[1:][::-1])), 3)
    def a038502(n):
        f=factorint(n)
        return 1 if n==1 else reduce(mul, [1 if i==3 else i**f[i] for i in f])
    def a038500(n): return n/a038502(n)
    def a263273(n): return 0 if n==0 else a030102(a038502(n))*a038500(n)
    def a263272(n): return a263273(2*n)/2
    def a(n): return 2*a263272(a263273(n)) # Indranil Ghosh, May 25 2017
  • Scheme
    (define (A265342 n) (* 2 (A265351 n)))
    

Formula

a(n) = 2 * A265351(n).