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.

A119959 p^2-p+1 central polygonal numbers with prime indices A002061(prime(n)).

Original entry on oeis.org

3, 7, 21, 43, 111, 157, 273, 343, 507, 813, 931, 1333, 1641, 1807, 2163, 2757, 3423, 3661, 4423, 4971, 5257, 6163, 6807, 7833, 9313, 10101, 10507, 11343, 11773, 12657, 16003, 17031, 18633, 19183, 22053, 22651, 24493, 26407, 27723, 29757, 31863
Offset: 1

Views

Author

Alexander Adamchuk, Aug 02 2006

Keywords

Comments

Prime terms belong to A074268, which is a subset of A002383, A087126, A034915, A085104.
In every interval of prime(n)^2 integers, a(n) is the number that are not divisible by prime(n) plus the number that are divisible by prime(n)^2. - Peter Munn, Dec 12 2020

Crossrefs

Programs

  • Mathematica
    Table[Prime[n]^2-Prime[n]+1,{n,1,100}]
  • PARI
    a(n) = {my(p = prime(n)); p^2 - p + 1; } \\ Amiram Eldar, Nov 07 2022

Formula

a(n) = prime(n)^2 - prime(n) + 1.
a(n) = A036689(n)+1. - R. J. Mathar, Aug 13 2019
Product_{n>=1} (1 - 1/a(n)) = zeta(6)/(zeta(2)*zeta(3)) (A068468). - Amiram Eldar, Nov 07 2022

A087139 Least k>1 such that p^k - p^(k-1) + 1 is prime for p = prime(n).

Original entry on oeis.org

2, 2, 3, 2, 11, 2, 5, 30, 15, 3, 6, 10, 81, 3, 17, 961, 15, 7, 2, 5, 6, 2, 3, 3, 12, 3, 57, 5, 16, 5, 166, 15, 13, 2, 3, 2, 30, 2, 25, 3, 47, 3, 3, 2, 521, 9, 3, 15, 17, 42, 17, 51, 39
Offset: 1

Views

Author

T. D. Noe, Aug 18 2003

Keywords

Comments

The next term in this sequence, a(54) for the prime p=251, is greater than 73000.
Is there a prime p such that p^k - p^(k-1) + 1 is composite for all k > 1? For the related question of Sierpinski numbers (n such that n*2^k+1 is composite for all k ), the answer is yes.
If n=251^k-251^(k-1)+1 is prime then k mod 10 = 1,5,7 or 9 because n mod 3 = 0 iff k is even and n mod 11 = 0 iff k mod 5 = 3. More exponents can be cleared this way. - Bernardo Boncompagni, Oct 23 2005
Note that k cannot be 8, 14, 20, ... (i.e. k == 2 mod 6) because then p^2 - p + 1 divides p^k - p^(k-1) + 1. - T. D. Noe, Aug 31 2006

References

Crossrefs

Cf. A040076 (Sierpinski numbers), A087126 (primes of the form p^k - p^(k-1) + 1).
Cf. A122396.

Programs

  • Mathematica
    lst={}; Do[p=Prime[n]; i=2; While[m=p^i-p^(i-1)+1; !PrimeQ[m], i++ ]; AppendTo[lst, i], {n, 53}]; lst
Showing 1-2 of 2 results.