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

A117961 Hexagonal numbers with prime indices.

Original entry on oeis.org

6, 15, 45, 91, 231, 325, 561, 703, 1035, 1653, 1891, 2701, 3321, 3655, 4371, 5565, 6903, 7381, 8911, 10011, 10585, 12403, 13695, 15753, 18721, 20301, 21115, 22791, 23653, 25425, 32131, 34191, 37401, 38503, 44253, 45451, 49141, 52975, 55611
Offset: 1

Views

Author

Jonathan Vos Post, Apr 05 2006

Keywords

Comments

See also: A034953 Triangular numbers (A000217) with prime indices. A001248 Squares of primes. A116995 Pentagonal numbers with prime indices. A000384 Hexagonal numbers: n(2n-1). There are no prime hexagonal numbers. The n-th Hexagonal number A000384(n) = n*(2*n-1) is semiprime iff both n and 2*n-1 are prime iff A000384(n) is an element of A001358 iff n is an element of A005382.

Crossrefs

Programs

  • Mathematica
    With[{hex=Table[n(2n-1),{n,250}]},Flatten[Table[Take[hex,{Prime[n]}],{n, 40}]]] (* Harvey P. Dale, Dec 04 2011 *)

Formula

a(n) = A000040(n)*(2*A000040(n)-1). a(n) = A000384(prime(n)). a(n) = number of divisors of 12^(prime(n)-1) = A000005(A001021(A000040(n)-1)).

A117962 Partial sums of hexagonal numbers with prime indices.

Original entry on oeis.org

6, 21, 66, 157, 388, 713, 1274, 1977, 3012, 4665, 6556, 9257, 12578, 16233, 20604, 26169, 33072, 40453, 49364, 59375, 69960, 82363, 96058, 111811, 130532, 150833, 171948, 194739, 218392, 243817, 275948, 310139, 347540, 386043, 430296, 475747
Offset: 1

Views

Author

Jonathan Vos Post, Apr 05 2006

Keywords

Comments

There are no prime hexagonal numbers. The n-th hexagonal number A000384(n) = n*(2*n-1) is semiprime iff both n and 2*n-1 are prime iff A000384(n) is an element of A001358 iff n is an element of A005382.

Examples

			a(4) = hexagonal(2) + hexagonal(3) + hexagonal(5) + hexagonal(7) = 6 + 15 + 45 + 91 = 157 is prime.
a(12) = 6 + 15 + 45 + 91 + 231 + 325 + 561 + 703 + 1035 + 1653 + 1891 + 2701 = 9257 is prime.
a(26) = 150833 is prime.
		

Crossrefs

See also: A034953 Triangular numbers (A000217) with prime indices. A001248 Squares of primes. A116995 Pentagonal numbers with prime indices. A000384 Hexagonal numbers: n(2n-1). A117961 Hexagonal numbers with prime indices. A117965 Prime partial sums of hexagonal numbers with prime indices.

Programs

  • Mathematica
    Accumulate[Table[n(2n-1),{n,Prime[Range[50]]}]] (* Harvey P. Dale, Jan 30 2014 *)

Formula

a(n) = SUM[i=1..n] A117961(i). a(n) = SUM[i=1..n] A000040(i)*(2*A000040(i)-1). a(n) = SUM[i=1..n] A000384(prime(n)). a(n) = Partial sum of number of divisors of 12^(prime(n)-1) = SUM[i=1..n] A000005(A001021(A000040(n)-1)).

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)).

A116911 Prime partial sums of pentagonal numbers with prime indices.

Original entry on oeis.org

5, 17, 4957, 129277, 2826443, 3861083, 5126483, 9451573, 19811083, 53751743, 68136617, 98729003, 264616831, 388771421, 498157871, 608312141, 682548511, 779346653, 918754301, 1174179079, 1700023891, 2056298683, 2149703411
Offset: 1

Views

Author

Jonathan Vos Post, Apr 03 2006

Keywords

Comments

See also: A116994 Prime partial sums of triangular numbers with prime indices. A116995 Pentagonal numbers with prime indices.

Examples

			a(1) = Sum_{i=1..1} prime(i)*(3*prime(i)-1)/2 = P(2) = 5.
a(2) = Sum_{i=1..2} prime(i)*(3*prime(i)-1)/2 = P(2) + P(3) = 17.
a(3) = Sum_{i=1..11} prime(i)*(3*prime(i)-1)/2 = P(2) + P(3) + P(5) + P(7) + P(11) + P(13) + P(17) + P(19) + P(23) + P(29) + P(31) = 4957.
a(4) = P(2) + ... + P(103) = 129277.
		

Crossrefs

Programs

  • Maple
    P:=n->n*(3*n-1)/2: seq(P(n),n=0..10): a:=proc(n) if isprime(sum(P(ithprime(j)),j=1..n))=true then sum(P(ithprime(j)),j=1..n) else fi end: seq(a(n),n=1..600); # Emeric Deutsch, Apr 15 2006
  • Mathematica
    Module[{nn=4000,pn,pr},pn=PolygonalNumber[5,Range[nn]];pr=Table[If[ PrimeQ[ n],1,0],{n,nn}];Select[Accumulate[Pick[pn,pr,1]],PrimeQ]] (* Harvey P. Dale, Jan 27 2020 *)

Formula

A000040 INTERSECTION {Partial sums of A116995(n)}. (Sum_{i=1..k} A000326(A000040(i))) iff in A000040. (Sum_{i=1..k} prime(i)*(3*prime(i)-1)/2) iff in A000040.

Extensions

More terms from Emeric Deutsch, Apr 15 2006

A346494 Heptagonal numbers (A000566) with prime indices (A000040).

Original entry on oeis.org

7, 18, 55, 112, 286, 403, 697, 874, 1288, 2059, 2356, 3367, 4141, 4558, 5452, 6943, 8614, 9211, 11122, 12496, 13213, 15484, 17098, 19669, 23377, 25351, 26368, 28462, 29539, 31753, 40132, 42706, 46717, 48094, 55279, 56776, 61387, 66178, 69472, 74563, 79834
Offset: 1

Views

Author

Dumitru Damian, Aug 22 2021

Keywords

Examples

			a(1) = Heptagonal(prime(1)) = A000566(2) = 2*(5*2-3)/2 = 7;
a(2) = Heptagonal(prime(2)) = A000566(3) = 3*(5*3-3)/2 = 18;
a(3) = Heptagonal(prime(3)) = A000566(5) = 5*(5*5-3)/2 = 55.
		

Crossrefs

Programs

  • Mathematica
    A346494[n_] := PolygonalNumber[7, Prime[n]]; Table[A346494[n], {n, 1, 41}] (* Robert P. P. McKone, Aug 22 2021 *)
  • PARI
    a(n) = my(p=prime(n)); p*(5*p-3)/2; \\ Michel Marcus, Sep 16 2021
  • Python
    from sympy import primerange
    print([p*(5*p-3)//2 for p in primerange(1, 180)]) # Michael S. Branicky, Aug 22 2021
    
  • Sage
    A = [int(p*(5*p-3)/2) for p in range(0,10^3) if p in Primes()]
    

Formula

a(n) = A000566(A000040(n)) = prime(n)*(5*prime(n)-3)/2.

A267217 10-gonal (or decagonal) numbers with prime indices.

Original entry on oeis.org

10, 27, 85, 175, 451, 637, 1105, 1387, 2047, 3277, 3751, 5365, 6601, 7267, 8695, 11077, 13747, 14701, 17755, 19951, 21097, 24727, 27307, 31417, 37345, 40501, 42127, 45475, 47197, 50737, 64135, 68251, 74665, 76867, 88357, 90751, 98125, 105787, 111055, 119197, 127627, 130501, 145351, 148417, 154645
Offset: 1

Views

Author

Ilya Gutkovskiy, Jan 12 2016

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Prime[n] (4 Prime[n] - 3), {n, 1, 45}]
    Module[{nn=200,pn},pn=PolygonalNumber[10,Range[nn]];Table[pn[[p]],{p,Prime[ Range[PrimePi[nn]]]}]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 27 2020 *)
  • PARI
    lista(nn) = forprime(p=2, nn, print1(p*(4*p-3), ", ")); \\ Altug Alkan, Jan 12 2016

Formula

a(n) = prime(n)*(4*prime(n) - 3) = A000040(n)*(4*A000040(n) - 4).
a(n) = A001107(A000040(n)).
a(n) = sigma_0(48^(prime(n) - 1)) = A000005(A009992(A000040(n) - 1)).
Showing 1-6 of 6 results.