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.

A267144 Octagonal numbers with prime indices.

Original entry on oeis.org

8, 21, 65, 133, 341, 481, 833, 1045, 1541, 2465, 2821, 4033, 4961, 5461, 6533, 8321, 10325, 11041, 13333, 14981, 15841, 18565, 20501, 23585, 28033, 30401, 31621, 34133, 35425, 38081, 48133, 51221, 56033, 57685, 66305, 68101, 73633, 79381, 83333, 89441, 95765
Offset: 1

Views

Author

Ilya Gutkovskiy, Jan 11 2016

Keywords

Crossrefs

Programs

  • Magma
    [NthPrime(n)*(3*NthPrime(n)-2): n in [1..50]]; // Vincenzo Librandi, Jan 12 2016
    
  • Mathematica
    Table[Prime[n] (3 Prime[n] - 2), {n, 1, 45}]
  • PARI
    lista(nn) = forprime(p=2, nn, print1(p*(3*p-2), ", ")); \\ Altug Alkan, Jan 11 2016
    
  • Python
    from sympy import prime
    def a(n): p = prime(n); return p*(3*p-2)
    print([a(n) for n in range(1, 42)]) # Michael S. Branicky, Aug 21 2021

Formula

a(n) = prime(n)*(3*prime(n) - 2) = A000040(n)*(3*A000040(n) - 2).
a(n) = A000567(A000040(n)).
a(n) = sigma_0(24^(prime(n) - 1)) = A000005(A009968(A000040(n) - 1)).