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

A001248 Squares of primes.

Original entry on oeis.org

4, 9, 25, 49, 121, 169, 289, 361, 529, 841, 961, 1369, 1681, 1849, 2209, 2809, 3481, 3721, 4489, 5041, 5329, 6241, 6889, 7921, 9409, 10201, 10609, 11449, 11881, 12769, 16129, 17161, 18769, 19321, 22201, 22801, 24649, 26569, 27889, 29929, 32041, 32761, 36481
Offset: 1

Views

Author

Keywords

Comments

Also 4, together with numbers n such that Sum_{d|n}(-1)^d = -A048272(n) = -3. - Benoit Cloitre, Apr 14 2002
Also, all solutions to the equation sigma(x) + phi(x) = 2x + 1. - Farideh Firoozbakht, Feb 02 2005
Unique numbers having 3 divisors (1, their square root, themselves). - Alexandre Wajnberg, Jan 15 2006
Smallest (or first) new number deleted at the n-th step in an Eratosthenes sieve. - Lekraj Beedassy, Aug 17 2006
Subsequence of semiprimes A001358. - Lekraj Beedassy, Sep 06 2006
Integers having only 1 factor other than 1 and the number itself. Every number in the sequence is a multiple of 1 factor other than 1 and the number itself. 4 : 2 is the only factor other than 1 and 4; 9 : 3 is the only factor other than 1 and 9; and so on. - Rachit Agrawal (rachit_agrawal(AT)daiict.ac.in), Oct 23 2007
The n-th number with p divisors is equal to the n-th prime raised to power p-1, where p is prime. - Omar E. Pol, May 06 2008
There are 2 Abelian groups of order p^2 (C_p^2 and C_p x C_p) and no non-Abelian group. - Franz Vrabec, Sep 11 2008
Also numbers n such that phi(n) = n - sqrt(n). - Michel Lagneau, May 25 2012
For n > 1, n is the sum of numbers from A006254(n-1) to A168565(n-1). - Vicente Izquierdo Gomez, Dec 01 2012
A078898(a(n)) = 2. - Reinhard Zumkeller, Apr 06 2015
Let r(n) = (a(n) - 1)/(a(n) + 1); then Product_{n>=1} r(n) = (3/5) * (4/5) * (12/13) * (24/25) * (60/61) * ... = 2/5. - Dimitris Valianatos, Feb 26 2019
Numbers k such that A051709(k) = 1. - Jianing Song, Jun 27 2021

Crossrefs

Programs

Formula

n such that A062799(n) = 2. - Benoit Cloitre, Apr 06 2002
A000005(a(n)^(k-1)) = A005408(k) for all k>0. - Reinhard Zumkeller, Mar 04 2007
a(n) = A000040(n)^(3-1)=A000040(n)^2, where 3 is the number of divisors of a(n). - Omar E. Pol, May 06 2008
A000005(a(n)) = 3 or A002033(a(n)) = 2. - Juri-Stepan Gerasimov, Oct 10 2009
A033273(a(n)) = 3. - Juri-Stepan Gerasimov, Dec 07 2009
For n > 2: (a(n) + 17) mod 12 = 6. - Reinhard Zumkeller, May 12 2010
A192134(A095874(a(n))) = A005722(n) + 1. - Reinhard Zumkeller, Jun 26 2011
For n > 2: a(n) = 1 (mod 24). - Zak Seidov, Dec 07 2011
A211110(a(n)) = 2. - Reinhard Zumkeller, Apr 02 2012
a(n) = A087112(n,n). - Reinhard Zumkeller, Nov 25 2012
a(n) = prime(n)^2. - Jon E. Schoenfield, Mar 29 2015
Product_{n>=1} a(n)/(a(n)-1) = Pi^2/6. - Daniel Suteu, Feb 06 2017
Sum_{n>=1} 1/a(n) = P(2) = 0.4522474200... (A085548). - Amiram Eldar, Jul 27 2020
From Amiram Eldar, Jan 23 2021: (Start)
Product_{n>=1} (1 + 1/a(n)) = zeta(2)/zeta(4) = 15/Pi^2 (A082020).
Product_{n>=1} (1 - 1/a(n)) = 1/zeta(2) = 6/Pi^2 (A059956). (End)

A084920 a(n) = (prime(n)-1)*(prime(n)+1).

Original entry on oeis.org

3, 8, 24, 48, 120, 168, 288, 360, 528, 840, 960, 1368, 1680, 1848, 2208, 2808, 3480, 3720, 4488, 5040, 5328, 6240, 6888, 7920, 9408, 10200, 10608, 11448, 11880, 12768, 16128, 17160, 18768, 19320, 22200, 22800, 24648, 26568, 27888, 29928
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 11 2003

Keywords

Comments

Squares of primes minus 1. - Wesley Ivan Hurt, Oct 11 2013
Integers k for which there exist exactly two positive integers b such that (k+1)/(b+1) is an integer. - Benedict W. J. Irwin, Jul 26 2016

Crossrefs

Programs

Formula

a(n) = A006093(n) * A008864(n);
a(n) = A084921(n)*2, for n > 1; a(n) = A084922(n)*6, for n > 2.
Product_{n > 0} a(n)/A066872(n) = 2/5. a(n) = A001248(n) - 1. - R. J. Mathar, Feb 01 2009
a(n) = prime(n)^2 - 1 = A001248(n) - 1. - Vladimir Joseph Stephan Orlovsky, Oct 17 2009
a(n) ~ n^2*log(n)^2. - Ilya Gutkovskiy, Jul 28 2016
a(n) = (1/2) * Sum_{|k|<=2*sqrt(p)} k^2*H(4*p-k^2) where H() is the Hurwitz class number and p is n-th prime. - Seiichi Manyama, Dec 31 2017
a(n) = 24 * A024702(n) for n > 2. - Jianing Song, Apr 28 2019
Sum_{n>=1} 1/a(n) = A154945. - Amiram Eldar, Nov 09 2020
From Amiram Eldar, Nov 07 2022: (Start)
Product_{n>=1} (1 + 1/a(n)) = Pi^2/6 (A013661).
Product_{n>=1} (1 - 1/a(n)) = A065469. (End)

A049002 Primes of form p^2 - 2, where p is prime.

Original entry on oeis.org

2, 7, 23, 47, 167, 359, 839, 1367, 1847, 2207, 3719, 5039, 7919, 10607, 11447, 16127, 17159, 19319, 29927, 36479, 44519, 49727, 54287, 57119, 66047, 85847, 97967, 113567, 128879, 177239, 196247, 201599, 218087, 241079, 273527, 292679, 323759
Offset: 1

Views

Author

Herman H. Rosenfeld (herm3(AT)pacbell.net)

Keywords

Examples

			127^2 - 2 = 16127.
		

Crossrefs

Primes in A049001.
Cf. A062326 (values of p).
Cf. A010051.

Programs

  • Haskell
    a049002 n = a049002_list !! (n-1)
    a049002_list = filter ((== 1) . a010051') a049001_list
    -- Reinhard Zumkeller, Jul 30 2015
  • Magma
    [a: p in PrimesUpTo(1000) | IsPrime(a) where a is p^2-2 ]; // Vincenzo Librandi, Apr 29 2015
    
  • Mathematica
    f[n_]:=n^2-2; lst={};Do[p=Prime[n];If[PrimeQ[f[p]],AppendTo[lst,f[p]]],{n,7!}];lst (* Vladimir Joseph Stephan Orlovsky, Jul 16 2009 *)
    Select[Prime[Range[150]]^2 - 2, PrimeQ] (* Vincenzo Librandi, Apr 29 2015 *)
  • PARI
    lista(nn) = forprime(p=1, nn, if (isprime(q=p^2-2), print1(q, ", "))); \\ Michel Marcus, Jan 08 2015
    
  • Sage
    a = lambda p: p^2-2
    [a(p) for p in primes(600) if is_prime(a(p))] # Bruno Berselli, Apr 29 2015
    

Formula

a(n) = A062326(n)^2-2. - Zak Seidov, Apr 29 2015

Extensions

More terms from James Sellers

A137291 Numbers m such that prime(m)^2-2 is prime.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 10, 12, 14, 15, 18, 20, 24, 27, 28, 31, 32, 34, 40, 43, 47, 48, 51, 52, 55, 62, 65, 68, 72, 82, 86, 87, 91, 94, 99, 100, 104, 107, 111, 119, 123, 128, 129, 130, 132, 133, 134, 135, 139, 141, 150, 152, 170, 172, 177, 180, 182, 191, 200, 202, 209, 211
Offset: 1

Views

Author

Ctibor O. Zizka, Apr 05 2008

Keywords

Comments

For m>=1, for these and only these numbers m, A242719(m) = prime(m)^2 + 1. Since A242719(m) >= prime(m)^2 + 1, then the equality is obtained on this and only this sequence. - Vladimir Shevelev, Sep 04 2014

Examples

			prime(24)*prime(24)-2 = 89*89-2 = 7919 is prime, so n=24 belongs to the sequence.
		

Crossrefs

Programs

  • Haskell
    a137291 n = a137291_list !! (n-1)
    a137291_list = filter ((== 1) . a010051' . a049001) [1..]
    -- Reinhard Zumkeller, Jul 30 2015
    
  • Mathematica
    Select[Range[211],PrimeQ[Prime[#]^2-2]&] (* James C. McMahon, May 28 2025 *)
  • PARI
    is(n,p=prime(n))=isprime(p^2-2) \\ Charles R Greathouse IV, Feb 17 2017

Formula

A103960(a(n)) - A210481(a(n)) = 1. - Reinhard Zumkeller, Jul 30 2015
a(n) = A049084(A049002(n)). - R. J. Mathar, Apr 09 2008

Extensions

More terms from R. J. Mathar, Apr 09 2008
Offset corrected by Reinhard Zumkeller, Jul 30 2015

A166010 a(n) = prime(n)^2-4.

Original entry on oeis.org

0, 5, 21, 45, 117, 165, 285, 357, 525, 837, 957, 1365, 1677, 1845, 2205, 2805, 3477, 3717, 4485, 5037, 5325, 6237, 6885, 7917, 9405, 10197, 10605, 11445, 11877, 12765, 16125, 17157, 18765, 19317, 22197, 22797, 24645, 26565, 27885, 29925, 32037
Offset: 1

Views

Author

Keywords

Comments

Least common multiple of prime(n)-2 and prime(n)+2.

Crossrefs

Programs

  • Magma
    [NthPrime(n)^2-4: n in [1..41]]; // Bruno Berselli, Apr 17 2012
    
  • Mathematica
    f[n_]:=LCM[n-2,n+2]; lst={};Do[p=Prime[n];AppendTo[lst,f[p]],{n,5!}]; lst
    Prime[Range[5!]]^2 - 4 (* Zak Seidov, Apr 17 2012 *)
  • PARI
    a(n)=prime(n)^2-4 \\ Charles R Greathouse IV, Apr 17 2012

Formula

a(n) = A001248(n)-4 = A040976(n)*A052147(n). [Bruno Berselli, Apr 17 2012]

Extensions

Definition rewritten by Bruno Berselli, Apr 17 2012

A182200 a(n) = prime(n)^2-3.

Original entry on oeis.org

1, 6, 22, 46, 118, 166, 286, 358, 526, 838, 958, 1366, 1678, 1846, 2206, 2806, 3478, 3718, 4486, 5038, 5326, 6238, 6886, 7918, 9406, 10198, 10606, 11446, 11878, 12766, 16126, 17158, 18766, 19318, 22198, 22798, 24646, 26566, 27886, 29926, 32038, 32758, 36478
Offset: 1

Views

Author

Bruno Berselli, Apr 17 2012

Keywords

Crossrefs

Programs

  • Magma
    [NthPrime(n)^2-3: n in [1..43]];
  • Maple
    A182200:=n->ithprime(n)^2-3; seq(A182200(k),k=1..50); # Wesley Ivan Hurt, Oct 11 2013
  • Mathematica
    Table[Prime[n]^2 - 3, {n, 43}]

Formula

a(n) = A061725(n)-5 = A066872(n)-4 = A001248(n)-3 = A084920(n)-2 = A049001(n)-1 = A166010(n)+1. [Formulas revised and extended by Bruno Berselli, Oct 15 2012]

A065017 Primes of the form p*q + p + q, where (p, q=p+2) are twin primes.

Original entry on oeis.org

23, 47, 167, 359, 1847, 3719, 10607, 19319, 97967, 177239, 273527, 657719, 1042439, 1104599, 1329407, 1515359, 1745039, 2042039, 4464767, 5013119, 5148359, 9740639, 11095559, 11377127, 12538679, 16024007, 16410599, 16752647
Offset: 1

Views

Author

Stephan Wagler (stephanwagler(AT)aol.com), Nov 01 2001

Keywords

Comments

The resulting prime can never be a twin prime since the odd number preceding it is divisible by three and the following odd number is a perfect square.

Examples

			(3*5) + (3+5) = 23.
		

Crossrefs

Programs

  • Mathematica
    NextPrim[n_] := Block[ {k = n + 1}, While[ !PrimeQ[k], k++ ]; Return[k]]; k = 1; Do[k = NextPrim[k]; If[ PrimeQ[k + 2], p = k*(k + 2) + 2k + 2; If[ PrimeQ[p], Print[p]]], {n, 1, 700} ]
    f[n_]:=Module[{x=Total[n]+Times@@n},If[PrimeQ[x],x,0]]; Select[f/@ (Select[Partition[Prime[Range[700]],2,1],Last[#]-First[#]==2&]), #!=0&] (* Harvey P. Dale, May 11 2011 *)
  • PARI
    { n=p=0; for (m=1, 10^9, p=nextprime(p + 1); if (isprime(q=p + 2) && isprime(a=p*q + p + q), write("b065017.txt", n++, " ", a); if (n==1000, return)) ) } \\ Harry J. Smith, Oct 03 2009

Formula

p^2 + 4*p + 2.

Extensions

Offset changed from 0 to 1 by Harry J. Smith, Oct 03 2009

A153480 a(n) = 2*prime(n)^2 - 4.

Original entry on oeis.org

4, 14, 46, 94, 238, 334, 574, 718, 1054, 1678, 1918, 2734, 3358, 3694, 4414, 5614, 6958, 7438, 8974, 10078, 10654, 12478, 13774, 15838, 18814, 20398, 21214, 22894, 23758, 25534, 32254, 34318, 37534, 38638, 44398, 45598, 49294, 53134, 55774
Offset: 0

Views

Author

Roger L. Bagula, Dec 27 2008

Keywords

Crossrefs

Programs

  • Magma
    [2*NthPrime(n)^2-4: n in [1..40]]; // Vincenzo Librandi, Aug 19 2016
  • Mathematica
    Clear[a, k]; a[k_] := 2*Prime[k]^2 - 4; Table[a[k], {k, 1, 30}]
    2*Prime[Range[25]]^2 - 4 (* G. C. Greubel, Aug 18 2016 *)
    Table[2 Prime[n]^2 - 4, {n, 60}] (* Vincenzo Librandi, Aug 19 2016 *)

Formula

a(n) = A079704(n)-4 = 2*A049001(n). - R. J. Mathar, Jan 03 2009

Extensions

Extended by R. J. Mathar, Jan 03 2009

A270972 Primes p such that p-2, p^2-2 and p^3-2 are all prime.

Original entry on oeis.org

19, 8629, 9721, 12109, 13831, 15331, 17029, 17989, 25849, 33151, 56209, 70999, 73039, 78541, 92461, 97369, 97609, 103069, 103969, 147139, 174469, 179719, 203341, 217369, 221401, 242059, 249541, 269431, 277549, 283009, 285559, 324619, 333451, 346669, 393079, 404269, 409261, 424891, 440551, 488689
Offset: 1

Views

Author

Emre APARI, Mar 27 2016

Keywords

Comments

Subsequence of A006512. - Altug Alkan, Mar 27 2016

Examples

			p=19; p-2 = 17 (is prime), p^2-2 = 359 (is prime), p^3-2 = 6857 (is prime).
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(500000) | IsPrime(p-2) and IsPrime(p^2-2) and IsPrime(p^3-2)]; // Vincenzo Librandi, Mar 28 2016
  • Mathematica
    Select[Prime@ Range@ 42000, Function[k, AllTrue[k^# & /@ Range@ 3 - 2, PrimeQ]]] (* Michael De Vlieger, Mar 27 2016, Version 10 *)
  • PARI
    lista(nn) = {forprime(p=5, nn, if(isprime(p-2) && isprime(p^2-2) && isprime(p^3-2), print1(p, ", ")));} \\ Altug Alkan, Mar 27 2016
    

Extensions

More terms from Altug Alkan, Mar 27 2016
Showing 1-9 of 9 results.