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

A365445 a(n) is the index of the least prime that is also a centered n-gonal number, or -1 if none exists.

Original entry on oeis.org

8, 3, 11, 4, 14, -1, -1, 5, 19, 6, 22, 14, 36, 7, 27, 8, 43, 18, 31, 9, 34, 21, 36, 22, 38, 10, 795, 11, 64, 25, 46, 27, 47, 12, 48, 50, 183, 13, 394, 14, 83, 121, 58, 15, 61, 169, 94, 36, 63, 16, 489, 38, 67, 68, 105, 17, 623, 18, 73, 74, 75, 44, 347
Offset: 3

Views

Author

Ilya Gutkovskiy, Sep 25 2023

Keywords

Crossrefs

Centered k-gonal primes listed in A276261.

Programs

  • Mathematica
    Table[PrimePi[SelectFirst[n # (# + 1)/2 + 1 & /@ Range[100], PrimeQ]], {n, 3, 65}] /. (PrimePi[Missing["NotFound"]] -> -1)
  • PARI
    a(n) = if ((n==8) || (n==9), return(-1)); my(k=0, p); while (!isprime(p=1+n*k*(k-1)/2), k++); primepi(p); \\ Michel Marcus, Sep 27 2023

Formula

a(n) = A000720(A365815(n)). - Michel Marcus, Sep 27 2023

A365815 a(n) is the least centered n-gonal prime, or -1 if none exists.

Original entry on oeis.org

19, 5, 31, 7, 43, -1, -1, 11, 67, 13, 79, 43, 151, 17, 103, 19, 191, 61, 127, 23, 139, 73, 151, 79, 163, 29, 6091, 31, 311, 97, 199, 103, 211, 37, 223, 229, 1093, 41, 2707, 43, 431, 661, 271, 47, 283, 1009, 491, 151, 307, 53, 3499, 163, 331, 337, 571, 59, 4603, 61
Offset: 3

Views

Author

Ilya Gutkovskiy, Sep 25 2023

Keywords

Crossrefs

Centered k-gonal primes listed in A276261.

Programs

  • Mathematica
    Table[SelectFirst[n # (# + 1)/2 + 1 & /@ Range[100], PrimeQ], {n, 3, 60}] /. (Missing["NotFound"] -> -1)
  • PARI
    a(n) = if ((n==8) || (n==9), return(-1)); my(k=0, p); while (!isprime(p=1+n*k*(k-1)/2), k++); p; \\ Michel Marcus, Sep 27 2023

A276262 Centered 22-gonal primes.

Original entry on oeis.org

23, 67, 331, 463, 617, 991, 1453, 2003, 2311, 4621, 6073, 7151, 7723, 8317, 8933, 11617, 12343, 14653, 15467, 18041, 19867, 25873, 26951, 28051, 29173, 37643, 41603, 42967, 51613, 61051, 62701, 64373, 66067, 67783, 73063, 78541, 94117, 102433, 117833, 120121, 131891, 136753
Offset: 1

Views

Author

Ilya Gutkovskiy, Aug 26 2016

Keywords

Comments

Primes of the form 11*k^2 + 11*k + 1.
Numbers k such that 11*k^2 + 11*k + 1 is prime: 1, 2, 5, 6, 7, 9, 11, 13, 14, 20, 23, 25, 26, 27, 28, 32, 33, 36, 37, 40, 42, 48, 49, 50, 51, ...

Crossrefs

Cf. centered k-gonal primes listed in A276261.

Programs

  • Magma
    [k: n in [1..120] | IsPrime(k) where k is 11*n^2-11*n+1]; // Vincenzo Librandi, Aug 29 2016
  • Maple
    select(isprime, [seq(11*k^2+11*k+1, k=1..1000)]);
  • Mathematica
    Intersection[Table[11 k^2 + 11 k + 1, {k, 0, 1000}], Prime[Range[13000]]]
    Select[Table[11n^2+11n+1,{n,150}],PrimeQ] (* Harvey P. Dale, Nov 22 2023 *)
  • PARI
    lista(nn) = for(n=1, nn, if(isprime(p=11*n^2 + 11*n + 1), print1(p, ", "))); \\ Altug Alkan, Aug 26 2016
    

A276264 Centered 25-gonal primes.

Original entry on oeis.org

151, 251, 701, 1951, 3001, 4751, 10151, 12401, 16651, 19501, 28201, 29401, 33151, 38501, 39901, 45751, 56951, 63901, 65701, 81001, 87151, 95701, 104651, 114001, 136501, 144451, 147151, 158201, 178501, 181501, 193751, 219451, 232901, 257401, 275651, 290701, 318001, 322001
Offset: 1

Views

Author

Ilya Gutkovskiy, Aug 26 2016

Keywords

Comments

Primes of the form (25*k^2 + 25*k + 2)/2.
Numbers k such that (25*k^2 + 25*k + 2)/2 is prime: 3, 4, 7, 12, 15, 19, 28, 31, 36, 39, 47, 48, 51, 55, 56, 60, 67, 71, 72, 80, 83, 87, 91, ...

Crossrefs

Cf. centered k-gonal primes listed in A276261.

Programs

  • Maple
    select(isprime, [seq((25*k^2+25*k+2)/2, k=1..200)]); # Robert Israel, Sep 01 2016
  • Mathematica
    Intersection[Table[(25 k^2 + 25 k + 2)/2, {k, 0, 1000}], Prime[Range[28000]]]
  • PARI
    lista(nn) = for(n=1, nn, if(isprime(p=(25*n^2 + 25*n + 2)/2), print1(p, ", "))); \\ Altug Alkan, Aug 26 2016

A276263 Centered 23-gonal primes.

Original entry on oeis.org

139, 829, 4831, 15319, 36709, 53959, 58789, 65551, 74521, 107089, 142969, 198859, 227011, 278071, 292561, 727399, 750721, 804541, 879199, 957169, 1181281, 1325491, 1364821, 1519519, 1700161, 1835401, 1881631, 2111539, 2231461, 2396509, 2778079, 2926981, 3067879
Offset: 1

Views

Author

Ilya Gutkovskiy, Aug 26 2016

Keywords

Comments

Primes of the form (23*k^2 + 23*k + 2)/2.
Numbers k such that (23*k^2 + 23*k + 2)/2 is prime: 3, 8, 20, 36, 56, 68, 71, 75, 80, 96, 111, 131, 140, 155, 159, 251, 255, 264, 276, ...

Crossrefs

Cf. centered k-gonal primes listed in A276261.

Programs

  • Mathematica
    Intersection[Table[(23 k^2 + 23 k + 2)/2, {k, 0, 1000}], Prime[Range[230000]]]
    Select[Table[(23k^2+23k+2)/2,{k,600}],PrimeQ] (* Harvey P. Dale, Jun 17 2021 *)
  • PARI
    lista(nn) = for(n=1, nn, if(isprime(p=(23*n^2 + 23*n + 2)/2), print1(p, ", "))); \\ Altug Alkan, Aug 26 2016
Showing 1-5 of 5 results.