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.

Previous Showing 11-20 of 20 results.

A159047 Primes which are triangular numbers plus 3.

Original entry on oeis.org

3, 13, 31, 139, 193, 409, 499, 823, 1381, 1543, 2083, 2281, 3163, 3919, 6673, 7753, 9319, 9733, 17581, 19309, 21739, 22369, 24979, 27031, 27733, 30631, 39343, 40189, 51043, 53959, 54949, 57973, 62131, 67531, 70879, 81409, 85081, 86323, 91381
Offset: 1

Views

Author

Keywords

Comments

For n>1, a(n)== 1 (mod 6). [Proof: the triangular numbers are {0,1,3,4} (mod 6), see A104686. 3 plus triangular numbers in the same set, and only those == 1 (mod 6) can be primes.] - Zak Seidov, Oct 16 2015

Examples

			13=10+3, 31=28+3, 139=136+3, 193=190+3, 409=406+3, ...
		

Crossrefs

Programs

  • Mathematica
    s=0;lst={};Do[s+=n;p=s+3;If[PrimeQ[p],AppendTo[lst,p]],{n,0,7!}];lst
    Select[Table[n*(n + 1)/2 + 3, {n, 0, 250}], PrimeQ] (* G. C. Greubel, Jul 13 2017 *)
    Select[Accumulate[Range[0,500]]+3,PrimeQ] (* Harvey P. Dale, Jul 30 2018 *)
  • PARI
    for(n=0, 1e3, if(isprime(k=3+n*(n+1)/2), print1(k", "))) \\ Altug Alkan, Oct 16 2015

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

A159048 Primes of the form m*(m+1)/2 + 4.

Original entry on oeis.org

5, 7, 19, 59, 109, 157, 257, 439, 599, 907, 1039, 1229, 1279, 1489, 1657, 3407, 3659, 4099, 5569, 6907, 7507, 7879, 8389, 9049, 10589, 11329, 11939, 14369, 16657, 17209, 17959, 18149, 18919, 19507, 20507, 22159, 26339, 30139, 31379, 34457, 36319
Offset: 1

Views

Author

Keywords

Examples

			7=3+4, 19=15+4, 59=55+4, 109=105+4, 157=153+4, 257=253+4, ...
		

Crossrefs

Programs

  • Mathematica
    Select[Accumulate[Range[500]]+4,PrimeQ]  (* Harvey P. Dale, Apr 23 2011 *)
  • PARI
    for(n=1, 500, if(isprime(k=n*(n+1)/2 + 4), print1(k, ", "))) \\ G. C. Greubel, Jul 03 2017

Extensions

Edited by N. J. A. Sloane, Apr 06 2009

A088579 Primes of the form n*x^n + (n-1)*x^(n-1) + . . . + x + 1 for x=2.

Original entry on oeis.org

3, 11, 643, 425987, 1909526242005090307
Offset: 1

Views

Author

Cino Hilliard, Nov 20 2003

Keywords

Comments

Sum of reciprocals = 0.4257999816852453227652727311..
Next term is too large to include.

Examples

			2*2^2 + 1*2 + 1 = 11 is prime.
		

Crossrefs

Cf. A055469 (for x=1), A088584 (for x=3), A088583 (for x=4).

Programs

  • Mathematica
    Select[Table[1+Sum[k 2^k, {k,n}], {n,1000}], PrimeQ] (* T. D. Noe, Nov 15 2006 *)
  • PARI
    polypn2(n,p) = { my(x=n,y=1); for(m=1,p, y=y+m*x^m; ); return(y) }
    trajpolyp(n1,k) = { my(s=0); for(x1=0,n1, y1 = polypn2(k,x1); if(isprime(y1),print1(y1, ","); s+=1.0/y1; ) ); }
    trajpolyp(500,2)

Extensions

Corrected by T. D. Noe and Don Reble, Nov 15 2006

A088584 Primes of the form n*x^n + (n-1)*x^(n-1) + . . . + x + 1 for x=3.

Original entry on oeis.org

103, 312088729, 9955641160957, 163142317702973500798039087, 327058383882861814163660125754017, 67973813526967723994124686175157751059, 545249446055539622797498212423248888694512551610580463
Offset: 1

Views

Author

Cino Hilliard, Nov 20 2003

Keywords

Comments

Sum of reciprocals = 0.009708741068395080316898549713.. Are these primes infinite?
The next term (a(8)) has 148 digits. - Harvey P. Dale, Dec 15 2018

Examples

			3*3^3 + 2*3^2 + 3 + 1 = 103.
		

Crossrefs

Programs

  • Mathematica
    Select[Accumulate[Join[{1},Table[n*3^n,{n,200}]]],PrimeQ] (* Harvey P. Dale, Dec 15 2018 *)
  • PARI
    trajpolyp(n1,k) = { s=0; for(x1=0,n1, y1 = polypn2(k,x1); if(isprime(y1),print1(y1","); s+=1.0/y1; ) ); print(); print(s) }
    polypn2(n,p) = { x=n; y=1; for(m=0,p, y=y+m*x^m; ); return(y) }

Extensions

More terms from Harvey P. Dale, Dec 15 2018

A159049 Primes of the form (5+ a triangular number A000217).

Original entry on oeis.org

5, 11, 41, 71, 83, 281, 383, 1181, 1601, 2351, 2633, 3491, 3833, 4283, 5783, 6221, 6791, 8783, 10301, 10883, 11633, 12251, 14033, 15581, 18341, 26111, 26801, 30881, 31883, 34721, 38231, 41333, 41621, 42491, 43961, 46061, 47591, 53633, 60383
Offset: 1

Views

Author

Keywords

Examples

			11 is in the list because it is A000217(3)+5 and a prime. 41=36+5= A000217(8)+5 is a prime. 71=66+5=A000217(11)+5 is a prime.
		

Crossrefs

Programs

  • Mathematica
    s=0;lst={};Do[s+=n;p=s+5;If[PrimeQ[p],AppendTo[lst,p]],{n,0,7!}];lst
    Select[Accumulate[Range[0,500]]+5,PrimeQ] (* Harvey P. Dale, Jul 08 2017 *)
  • PARI
    for(n=1,500, if(isprime(k=n*(n+1)/2 + 5), print1(k, ", "))) \\ G. C. Greubel, Jul 13 2017

Extensions

Definition rephrased, R. J. Mathar, Apr 05 2009

A185510 Array of primes in the natural number array A000027, by antidiagonals.

Original entry on oeis.org

2, 7, 3, 11, 5, 13, 29, 17, 31, 19, 37, 23, 139, 59, 41, 67, 47, 193, 109, 71, 61, 79, 107, 409, 157, 83, 97, 43, 137, 173, 499, 257, 281, 331, 73, 53, 191, 233, 823, 439, 383, 601, 127, 113, 199, 211, 353, 1381, 599, 1181, 709, 197, 179, 829, 101, 277, 467, 1543, 907, 1601, 1087, 283, 239, 1549, 163, 89
Offset: 1

Views

Author

Clark Kimberling, Jan 29 2011

Keywords

Comments

Start with the natural number array A000027:
1....2.....4....7...11...16...22...29...
3....5.....8...12...17...23...30...38...
6....9....13...18...24...31...39...48...
10...14...19...25...32...40...49...59...
15...20...26...33...41...50...60...71...
21...27...34...42...51...61...72...84...
28...35...43...52...62...73...85...98...
Row n of A185510 shows the primes in row n of A000027:
2....7....11...29...37....67....79...137...(A055469)
3....5....17...23...47...107...173...233...(A055472)
13..31...139..193..409...499...823..1381...(A159047)
19..59...109..157..257...439...599...907...(A159048)
41..71....83..281..383..1181..1601..2351...(A159049)
61..97...331..601..709..1087..1231..2707...
43..73...127..197..283..307...503...673...
Conjecture: Every row contains infinitely many primes.
Every prime occurs exactly once; that is, every prime is uniquely expressible as (1/2)(n^2 + (2k-1)n + (k-2)(k-1)) for some positive integers n and k. We assume as true the conjecture that each row is infinite. - Clark Kimberling, Mar 10 2020

Crossrefs

Programs

  • Mathematica
    f[n_,k_]:=n+(k+n-2)(k+n-1)/2;
    TableForm[Map[Select[#,PrimeQ]&, Table[f[n,k],{n,1,20}, {k,1,100}]]]

A360944 Numbers m such that phi(m) is a triangular number, where phi is the Euler totient function (A000010).

Original entry on oeis.org

1, 2, 7, 9, 11, 14, 18, 22, 29, 37, 57, 58, 63, 67, 74, 76, 79, 108, 114, 126, 134, 137, 143, 155, 158, 175, 183, 191, 211, 225, 231, 244, 248, 274, 277, 286, 308, 310, 329, 341, 350, 366, 372, 379, 382, 396, 417, 422, 423, 450, 453, 462, 554, 556, 604, 623, 631, 658, 682
Offset: 1

Views

Author

Bernard Schott, Feb 26 2023

Keywords

Comments

Subsequence of primes is A055469 because in this case phi(k(k+1)/2+1) = k(k+1)/2.
Subsequence of triangular numbers is A287472.

Examples

			phi(57) = 36 = 8*9/2, a triangular number; so 57 is a term of the sequence.
		

Crossrefs

Similar, but with phi(m) is: A039770 (square), A078164 (biquadrate), A096503 (repdigit), A117296 (palindrome), A236386 (oblong).

Programs

  • Maple
    filter := m ->  issqr(1 + 8*numtheory:-phi(m)) : select(filter, [$(1 .. 700)]);
  • Mathematica
    Select[Range[700], IntegerQ[Sqrt[8 * EulerPhi[#] + 1]] &] (* Amiram Eldar, Feb 27 2023 *)
  • PARI
    isok(m) = ispolygonal(eulerphi(m), 3); \\ Michel Marcus, Feb 27 2023
    
  • Python
    from itertools import islice, count
    from sympy.ntheory.primetest import is_square
    from sympy import totient
    def A360944_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:is_square((totient(n)<<3)+1), count(max(1,startvalue)))
    A360944_list = list(islice(A360944_gen(),20)) # Chai Wah Wu, Feb 28 2023

A169583 n-th prime*8-7 is the square of a prime.

Original entry on oeis.org

1, 4, 12, 19, 47, 59, 115, 167, 217, 251, 306, 348, 414, 618, 630, 662, 809, 1077, 1138, 1218, 1670, 1876, 2272, 2680, 2869, 3402, 3633, 4242, 4353, 4661, 5255, 6463, 6596, 6986, 8543, 8870, 8992, 9340, 9444, 10265, 11544, 11921, 12449, 13887, 14031
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Mar 01 2010

Keywords

Examples

			1 is in the sequence because 1st prime*8-7=(2nd prime)^2;
4 is in the sequence because 4th prime*8-7=(4th prime)^2;
12 is in the sequence because 12th prime*8-7=(7th prime)^2.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[15000],PrimeQ[Sqrt[8Prime[#]-7]]&] (* Harvey P. Dale, Nov 10 2017 *)
  • PARI
    isok(n) = issquare(sq=prime(n)*8-7) && isprime(sqrtint(sq)); \\ Michel Marcus, Apr 15 2014

Extensions

Corrected (1077 inserted) and extended by R. J. Mathar, Jun 04 2010
Previous Showing 11-20 of 20 results.