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

A056105 First spoke of a hexagonal spiral.

Original entry on oeis.org

1, 2, 9, 22, 41, 66, 97, 134, 177, 226, 281, 342, 409, 482, 561, 646, 737, 834, 937, 1046, 1161, 1282, 1409, 1542, 1681, 1826, 1977, 2134, 2297, 2466, 2641, 2822, 3009, 3202, 3401, 3606, 3817, 4034, 4257, 4486, 4721, 4962, 5209, 5462, 5721, 5986, 6257
Offset: 0

Views

Author

Henry Bottomley, Jun 09 2000

Keywords

Comments

Also the number of (not necessarily maximal) cliques in the n X n grid graph. - Eric W. Weisstein, Nov 29 2017

Examples

			The spiral begins:
                   49--48--47--46--45
                   /                 \
                 50  28--27--26--25  44
                 /   /             \   \
               51  29  13--12--11  24  43
               /   /   /         \   \   \
             52  30  14   4---3  10  23  42  67
             /   /   /   /     \   \   \   \   \
           53  31  15   5   1===2===9==22==41==66==>
             \   \   \   \         /   /   /   /
             54  32  16   6---7---8  21  40  65
               \   \   \             /   /   /
               55  33   17--18--19--20  39  64
                 \   \                 /   /
                 56  34--35--36--37--38  63
                   \                     /
                   57--58--59--60--61--62
		

Crossrefs

Cf. A285792 (prime terms), A113519 (semiprime terms).
Other spirals: A054552.

Programs

Formula

a(n) = 3*n^2 - 2*n + 1.
a(n) = a(n-1) + 6*n - 5.
a(n) = 2*a(n-1) - a(n-2) + 6.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
a(n) = A056106(n) - n = A056107(n) - 2*n.
a(n) = A056108(n) - 3*n = A056109(n) - 4*n = A003215(n) - 5*n.
A008810(3*n-1) = A056109(-n) = a(n). - Michael Somos, Aug 03 2006
G.f.: (1-x+6*x^2)/(1-3*x+3*x^2-x^3). - Colin Barker, Jan 04 2012
From Robert G. Wilson v, Jul 05 2014: (Start)
Each of the 6 primary spokes or rays has a generating formula as stated here:
1st: 90 degrees A056105 3n^2 - 2n + 1
2nd: 30 degrees A056106 3n^2 - n + 1
3rd: 330 degrees A056107 3n^2 + 1
4th: 270 degrees A056108 3n^2 + n + 1
5th: 210 degrees A056109 3n^2 + 2n + 1
6th: 150 degrees A003215 3n^2 + 3n + 1
Each of the 6 secondary spokes or rays has a generating formula as stated here:
1st: 60 degrees 12n^2 - 27n + 16
2nd: 360 degrees 12n^2 - 25n + 14
3rd: 300 degrees 12n^2 - 23n + 12
4th: 240 degrees 12n^2 - 21n + 10
5th: 180 degrees 12n^2 - 19n + 8
6th: 120 degrees 12n^2 - 17n + 6 = A033577(n+1)
(End)
a(n) = 1 + A000567(n). - Omar E. Pol, Apr 26 2017
a(n) = A000290(n-1) + 2*A000290(n), n >= 1. - J. M. Bergot, Mar 03 2018
E.g.f.: (1 + x + 3*x^2)*exp(x). - G. C. Greubel, Dec 02 2018

A285790 Primes equal to a hexagonal number plus 1.

Original entry on oeis.org

2, 7, 29, 67, 191, 277, 379, 631, 947, 1129, 1327, 2017, 2557, 2851, 4561, 4951, 5779, 6217, 8647, 9181, 12721, 13367, 14029, 15401, 16111, 17579, 20707, 21529, 22367, 24091, 24977, 31627, 36857, 37951, 42487, 43661, 44851, 47279, 53629, 58997, 64621, 66067
Offset: 1

Views

Author

Colin Barker, Apr 26 2017

Keywords

Comments

Apart from the leading 2 the same as A176616. - R. J. Mathar, Apr 27 2017
Primes in A130883. - Omar E. Pol, Apr 27 2017

Crossrefs

Programs

  • Mathematica
    Select[PolygonalNumber[6,Range[200]]+1,PrimeQ] (* Harvey P. Dale, Jun 16 2022 *)
  • PARI
    pg(m, n) = (n^2*(m-2)-n*(m-4))/2 \\ n-th m-gonal number
    maxk=300; L=List(); for(k=1, maxk, if(isprime(p=pg(6, k) + 1), listput(L, p))); Vec(L)

A285789 Primes equal to a pentagonal number plus 1.

Original entry on oeis.org

2, 13, 23, 71, 211, 331, 853, 1163, 1427, 2381, 2753, 3433, 3877, 5923, 6113, 6701, 7741, 8627, 9323, 11311, 12377, 14653, 14951, 17443, 18427, 23003, 27271, 31033, 32341, 32783, 34127, 38321, 43777, 52361, 55201, 56941, 57527, 62323, 64171, 64793, 69877
Offset: 1

Views

Author

Colin Barker, Apr 26 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Select[PolygonalNumber[5,Range[300]]+1,PrimeQ] (* Harvey P. Dale, Dec 04 2024 *)
  • PARI
    pg(m, n) = (n^2*(m-2)-n*(m-4))/2 \\ n-th m-gonal number
    maxk=300; L=List(); for(k=1, maxk, if(isprime(p=pg(5, k) + 1), listput(L, p))); Vec(L)

A285791 Primes equal to a heptagonal number plus 1.

Original entry on oeis.org

2, 19, 113, 149, 541, 617, 971, 1289, 1783, 2357, 3011, 3187, 5689, 6427, 7481, 7757, 9829, 12497, 12853, 14327, 15881, 17099, 18793, 21023, 24851, 28463, 30637, 31193, 45361, 50909, 54539, 60607, 63761, 66179, 69473, 70309, 83449, 88079, 90917, 91873, 94771
Offset: 1

Views

Author

Colin Barker, Apr 26 2017

Keywords

Crossrefs

Programs

  • PARI
    pg(m, n) = (n^2*(m-2)-n*(m-4))/2 \\ n-th m-gonal number
    maxk=300; L=List(); for(k=1, maxk, if(isprime(p=pg(7, k) + 1), listput(L, p))); Vec(L)
    
  • Python
    from sympy import isprime
    def heptagonal(n): return n*(5*n-3)//2
    def aupto(limit):
      alst, n, hn = [], 1, heptagonal(1)
      while hn < limit:
        if isprime(hn+1): alst.append(hn+1)
        n, hn = n+1, heptagonal(n+1)
      return alst
    print(aupto(94771)) # Michael S. Branicky, Feb 19 2021
Showing 1-4 of 4 results.