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.

A181363 1 followed by the primes, interleaved recursively.

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 5, 1, 7, 3, 11, 2, 13, 5, 17, 1, 19, 7, 23, 3, 29, 11, 31, 2, 37, 13, 41, 5, 43, 17, 47, 1, 53, 19, 59, 7, 61, 23, 67, 3, 71, 29, 73, 11, 79, 31, 83, 2, 89, 37, 97, 13, 101, 41, 103, 5, 107, 43, 109, 17, 113, 47, 127, 1, 131, 53, 137, 19, 139, 59, 149, 7, 151, 61
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 16 2010

Keywords

Comments

a(2*n-1) = A008578(n); a(2*n+1) = A000040(n);
a((2*n-1)*2^k) = A008578(n), k >= 0;
a(2^k) = 1, k >= 0; a(2^k - 1) = A051438(k), k > 0.

Examples

			Initial values, seen as a binary tree:
................................. 1
................ 1 _______________________________ 2
........ 1 _____________ 3 .............. 2 ______________ 5
... 1 _____ 7 ..... 3 ______ 11 .... 2 ______ 13 .... 5 ______ 17
.. 1__19...7__23...3__29...11__31...2__37...13__41...5__43...17__47
		

Programs

  • Haskell
    import Data.List (transpose)
    a181363 n = a181363_list !! (n-1)
    a181363_list = concat $ transpose [a008578_list, a181363_list]
    -- Reinhard Zumkeller, Mar 22 2014, Oct 20 2011, Oct 16 2010

Formula

a(n) = if even n then a(n/2) else A008578((n+1)/2).
a(n) = A008578(A025480(n-1)+1). - Reinhard Zumkeller, Mar 22 2014