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-10 of 12 results. Next

A089001 Numbers n such that 2*n^2 + 1 is prime.

Original entry on oeis.org

1, 3, 6, 9, 21, 24, 27, 30, 33, 36, 42, 45, 66, 72, 75, 87, 93, 96, 99, 102, 105, 123, 132, 135, 153, 156, 162, 177, 186, 189, 201, 204, 219, 228, 237, 240, 255, 264, 273, 285, 297, 300, 306, 321, 324, 327, 351, 357, 360, 366, 375, 387, 393, 399, 405, 417, 423
Offset: 1

Views

Author

N. J. A. Sloane, Dec 20 2003

Keywords

Comments

All terms except the first one are multiples of 3. - Zak Seidov, Feb 24 2006
And because of this, all the primes except for the first one are congruent to 1 (mod 6). - Robert G. Wilson v, Aug 05 2014
For any n in this sequence, 3*(2*n^2 + 1) has the same nonzero digits as its prime factors in base 2n. - Ely Golden, Dec 12 2016

Crossrefs

Programs

Formula

a(n)=((A090698(n)-1)/2)^(1/2).
Starting with n=2, a(n)=3*A089008(n-1). - Zak Seidov, Feb 24 2006

A090612 Numbers k such that the k-th prime is of the form 2*j^2 + 1.

Original entry on oeis.org

2, 8, 21, 38, 153, 191, 232, 279, 327, 378, 493, 559, 1086, 1272, 1360, 1769, 1989, 2111, 2224, 2344, 2471, 3272, 3721, 3863, 4838, 5006, 5359, 6291, 6871, 7077, 7909, 8127, 9245, 9928, 10654, 10889, 12164, 12957, 13764, 14881, 16034, 16343, 16944
Offset: 1

Views

Author

Ray Chandler, Dec 21 2003

Keywords

Comments

A090698 indexed by A000040.

Examples

			From _Jon E. Schoenfield_, Jan 24 2018: (Start)
prime(8) = 19 = 2*3^2 + 1, so 8 is in the sequence.
prime(21) = 73 = 2*6^2 + 1, so 21 is in the sequence.
prime(33) = 137 = 2*68 + 1, and 68 is not a square, so 33 is not in the sequence. (End)
		

Crossrefs

Programs

  • Maple
    N:= 1000; # to get all entries corresponding to primes <= 2*N^2+1.
    R:= select(isprime,[seq(2*k^2+1,k=1..N)]):
    A090612:= map(numtheory[pi],R); # Robert Israel, May 09 2014
  • Mathematica
    Select[Range[18000],IntegerQ[Sqrt[(Prime[#]-1)/2]]&] (* Harvey P. Dale, Apr 25 2016 *)

Formula

a(n)=k such that A000040(k) = A090698(n) = 2*A089001(n)^2 + 1.

A089008 Numbers k such that 18*k^2 + 1 is prime.

Original entry on oeis.org

1, 2, 3, 7, 8, 9, 10, 11, 12, 14, 15, 22, 24, 25, 29, 31, 32, 33, 34, 35, 41, 44, 45, 51, 52, 54, 59, 62, 63, 67, 68, 73, 76, 79, 80, 85, 88, 91, 95, 99, 100, 102, 107, 108, 109, 117, 119, 120, 122, 125, 129, 131, 133, 135, 139, 141, 142, 143, 147, 150, 152, 154, 156
Offset: 1

Views

Author

N. J. A. Sloane, Dec 20 2003

Keywords

Comments

There are 8 consecutive terms at n=13537 and n=105819293 for n < 10^9. - Jean C. Lambry, Oct 19 2015
Since 18*k^2 + 1 is divisible by 17 for k == 4, 13 (mod 17), the maximum possible number of consecutive terms is 8, in which case the first term must be congruent to 5 modulo 17 and 7 or 8 modulo 11. - Jianing Song, Nov 14 2021

Crossrefs

Programs

  • Mathematica
    Select[Range[200],PrimeQ[18#^2+1]&]  (* Harvey P. Dale, Apr 25 2011 *)
  • PARI
    for(n=0, 1e3, if(isprime(k=(18*n^2 + 1)), print1(n", "))) \\ Altug Alkan, Oct 19 2015

Formula

a(n) = A089001(n+1)/3.

A249410 Primes p such that sigma(p-1) is odd.

Original entry on oeis.org

2, 3, 5, 17, 19, 37, 73, 101, 163, 197, 257, 401, 577, 677, 883, 1153, 1297, 1459, 1601, 1801, 2179, 2593, 2917, 3137, 3529, 4051, 4357, 5477, 7057, 8101, 8713, 8837, 10369, 11251, 12101, 13457, 14401, 15139, 15377, 15877, 16901, 17299, 17957, 18433, 19603
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Oct 27 2014

Keywords

Comments

Subsequence of A058501.
Union of A002496 and A090698. - Ivan Neretin, Dec 04 2018
Except for the terms 2 and 3, union of the primes of the form 4*k^2 + 1 and the primes of the form 18*k^2 + 1. - Jianing Song, Nov 14 2021

Examples

			2 is in this sequence because 2 is prime and sigma(2-1) = 1 is odd.
		

Crossrefs

Programs

  • GAP
    Filtered(Filtered([1..25000],i->IsPrime(i)),p->IsOddInt(Sigma(p-1))); # Muniru A Asiru, Dec 05 2018
  • Mathematica
    Select[Range[20000], PrimeQ[#] && OddQ[DivisorSigma[1, #-1]] &] (* Amiram Eldar, Dec 04 2018 *)
  • PARI
    lista(nn) = {forprime(p=2, nn, if (sigma(p-1) % 2, print1(p, ", ")););} \\ Michel Marcus, Oct 30 2014
    
  • PARI
    list(lim)=my(v=List([2]),t); forstep(n=2,sqrt(lim),2, if(isprime(t=n^2+1), listput(v,t))); for(n=1,sqrtint(lim\2), if(isprime(t=2*n^2+1), listput(v,t))); Set(v) \\ Charles R Greathouse IV, Nov 04 2014
    

Extensions

More terms from Michel Marcus, Oct 30 2014

A341938 Numbers m such that the geometric mean of tau(m) and phi(m) is an integer where phi is the Euler totient function (A000010) and tau is the number of divisors function (A000005).

Original entry on oeis.org

1, 3, 8, 10, 18, 19, 24, 30, 34, 45, 52, 54, 57, 73, 74, 85, 102, 125, 135, 140, 152, 153, 156, 163, 182, 185, 190, 202, 219, 222, 252, 255, 333, 342, 360, 375, 394, 416, 420, 436, 451, 455, 456, 459, 476, 489, 505, 514, 546, 555, 570, 584, 606, 625, 629, 640, 646, 679, 680, 730
Offset: 1

Views

Author

Bernard Schott, Feb 24 2021

Keywords

Comments

The first 11 terms of this sequence are also the first 11 terms of A341939: m such that phi(m)/tau(m) is the square of an integer. Indeed, if phi(m)/tau(m) is a perfect square then phi(m)*tau(m) is also a square, but the converse is false. These counterexamples are in A341940, the first one is a(12) = 54.
If k and q are terms and coprimes, then k*q is another term.
Some subsequences (see examples):
-> The seven terms that satisfy tau(m) = phi(m) form the subsequence A020488.
-> Primes p of the form 2*k^2 + 1 (A090698) form another subsequence because tau(p) = 2 and phi(p) = p-1 = 2*k^2, so tau(p)*phi(p) = (2*k)^2.
-> Cubes p^3 where p is a prime of the form k^2+1 (A002496) form another subset with tau(p^3)*phi(p^3) = (2*k*p)^2.

Examples

			phi(18) = tau(18) = 6, so phi(18)*tau(18) = 6^2.
phi(19) = 18, tau(19) = 2, so phi(19)*tau(19) = 36 = 6^2.
phi(34) = 16, tau(34) = 4, so phi(34)*tau(34) = 16*4 = 64 = 8^2.
phi(125) = 100, tau(125) = 4, so phi(125)*tau(125) = 400 = 20^2.
		

Crossrefs

Similar for: A011257 (phi*sigma square), A327830 (sigma*tau square).
Subsequences: A020488, A090698.
Cf. A000005 (tau), A000010 (phi).

Programs

  • Maple
    with(numtheory): filter:= n -> issqr(phi(n)*tau(n)) : select(filter, [$1..750]);
  • Mathematica
    Select[Range[1000], IntegerQ @ GeometricMean[{DivisorSigma[0, #], EulerPhi[#]}] &] (* Amiram Eldar, Feb 24 2021 *)
  • PARI
    isok(m) = issquare(numdiv(m)*eulerphi(m)); \\ Michel Marcus, Feb 24 2021

A341939 Numbers m such that phi(m)/tau(m) is a square of an integer where phi is the Euler totient function (A000010) and tau is the number of divisors function (A000005).

Original entry on oeis.org

1, 3, 8, 10, 18, 19, 24, 30, 34, 45, 52, 57, 73, 74, 85, 102, 125, 135, 140, 152, 153, 156, 163, 182, 185, 190, 202, 219, 222, 252, 255, 333, 342, 360, 375, 394, 416, 420, 436, 451, 455, 456, 459, 476, 489, 505, 514, 546, 555, 570, 584, 606, 625, 629, 640, 646, 679, 680, 730
Offset: 1

Views

Author

Bernard Schott, Feb 24 2021

Keywords

Comments

The first 11 terms of this sequence are also the first 11 terms of A341938: m such that phi(m)*tau(m) is a square, then, a(12) = 57 while A341938(12) = 54. Indeed, if phi(m)/tau(m) is a perfect square then phi(m)*tau(m) is also a square, but the converse is false. These counterexamples are in A341940, the first one is 54 (last example).
Some subsequences (see examples):
-> The seven terms that satisfy also tau(m) = phi(m) form the subsequence A020488 with phi(m)/tau(m) = 1^2.
-> Primes p of the form 2*k^2 + 1 (A090698) form another subsequence because tau(p) = 2 and phi(p) = p-1 = 2*k^2, so phi(p)/tau(p) = k^2.
-> Cubes p^3 where p is a prime of the form k^2+1 (A002496) form another subset because if p = 2, phi(8)/tau(8)=1, and if p odd, phi(p^3)/tau(p^3) = (k*p/2)^2 with k even.

Examples

			phi(30) = 8, tau(30) = 8 so phi(30)/tau(30) = 1^2, and 30 is a term.
phi(45) = 24, tau(45) = 6, so phi(45)/tau(45) = 4 = 2^2, and 85 is a term.
phi(125) = 100, tau(125) = 4, so phi(125)/tau(125) = 25 = 5^2, and 125 is a term.
phi(54) = 18, tau(54) = 8, and phi(54)/tau(54) = 18/8 = 9/4 = (3/2)^2 and 54 is not a term while phi(54)*tau(54) = 12^2.
		

Crossrefs

Intersection of A020491 and A341938.
Similar for: A144695 (sigma(n)/tau(n) perfect square), A293391 (sigma(n)/phi(n) perfect square).
Subsequences: A090698, A020488.
Cf. A000005 (phi), A000010(tau).

Programs

  • Maple
    with(numtheory): filter:= q -> phi(q)/tau(q) = floor(phi(q)/tau(q)) and issqr(phi(q)/tau(q)) : select(filter, [$1..750]);
  • Mathematica
    Select[Range[1000], IntegerQ @ Sqrt[EulerPhi[#]/DivisorSigma[0, #]] &] (* Amiram Eldar, Feb 24 2021 *)
  • PARI
    isok(m) = my(x=eulerphi(m)/numdiv(m)); (denominator(x)==1) && issquare(x); \\ Michel Marcus, Feb 24 2021

A129827 Numbers k such that Euler's totient phi(k) divided by 2 is a perfect square.

Original entry on oeis.org

3, 4, 6, 15, 16, 19, 20, 24, 27, 30, 38, 51, 54, 64, 68, 73, 80, 91, 95, 96, 102, 111, 117, 120, 135, 146, 148, 152, 163, 182, 190, 216, 222, 228, 234, 243, 252, 255, 256, 270, 272, 275, 303, 320, 323, 326, 340, 365, 375, 384, 404, 408, 455, 459, 480, 486, 500
Offset: 1

Views

Author

Walter Nissen, May 20 2007

Keywords

Comments

Primes in this sequence are of the form 2*m^2+1 (see A090698). - Bernard Schott, Mar 07 2020
If k is an odd term, so is 2*k. If k is an even term, so is 4*k. - Waldemar Puszkarz, Oct 15 2024

Examples

			a(4) is 15 because phi(15) = 8, which is twice the square of 2.
		

Crossrefs

Cf. A000010, A000290, A090698 (subsequence).

Programs

  • Mathematica
    Select[Range[500], IntegerQ @ Sqrt[EulerPhi[#]/2] &] (* Amiram Eldar, Mar 07 2020 *)
  • PARI
    isok(n) = issquare(eulerphi(n)/2) \\ Michel Marcus, Jul 23 2013
    
  • Python
    from sympy import totient
    from sympy.ntheory.primetest import is_square
    for i in range(3, 501):
        if is_square(int(totient(i)/2)):
            print(i, end=", ") # Waldemar Puszkarz, Oct 15 2024

A247271 Numbers n such that n^2+1 and 2*n^2+1 are both prime numbers.

Original entry on oeis.org

1, 6, 24, 36, 66, 156, 204, 240, 264, 300, 306, 474, 570, 636, 750, 864, 936, 960, 1146, 1176, 1290, 1494, 1524, 1716, 1974, 2034, 2136, 2310, 2406, 2706, 2736, 2964, 3156, 3240, 3624, 3756, 3774, 3900, 3984, 4026, 4080, 4524, 4530, 4554, 4590, 4644, 4650, 4716
Offset: 1

Views

Author

Michel Lagneau, Sep 11 2014

Keywords

Comments

Numbers n such that A002522(n) and A058331(n) are prime numbers.
a(n)==0 mod 6 because the primes n^2+1 and 2*n^2+1 are congruent to 1 (mod 6).
The corresponding pairs of primes (n^2+1,2*n^2+1) are (2,3), (37,73), (577, 1153), (1297,2593), (4357,8713), (24337,48673), ...

Examples

			a(2)=6 because A002522(6)=37 and A058331(6)=73 are both prime numbers.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..5000] | IsPrime(n^2+1) and IsPrime(2*n^2+1)]; // Vincenzo Librandi, Sep 14 2014
  • Maple
    A247271:=n->`if`(isprime(n^2+1) and isprime(2*n^2+1), n, NULL): seq(A247271(n), n=1..10^4); # Wesley Ivan Hurt, Sep 12 2014
  • Mathematica
    lst={}; Do[p=n^2+1; q=2n^2+1; If[PrimeQ[p] && PrimeQ[q], AppendTo[lst, n]], {n, 5000}]; lst
  • PARI
    for(n=1,10^4,if(isprime(n^2+1)&&isprime(2*n^2+1),print1(n,", "))) \\ Derek Orr, Sep 11 2014
    

A256917 Primes which are not the sums of two consecutive nonsquares.

Original entry on oeis.org

2, 3, 7, 17, 19, 31, 71, 73, 97, 127, 163, 199, 241, 337, 449, 577, 647, 881, 883, 967, 1151, 1153, 1249, 1459, 1567, 1801, 2179, 2311, 2591, 2593, 2887, 3041, 3361, 3527, 3529, 3697, 4049, 4051, 4231, 4801, 4999, 5407, 6271, 6961, 7687, 7937, 8191, 8713, 9521, 10369, 10657
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 23 2015

Keywords

Comments

The union of 2 and A066436 and A090698.
The sums of two consecutive nonsquares are 5, 8, 11, 13, 15, 18, 21, 23, 25, 27, 29, 32, 35, 37, ...

Examples

			2, 3, 7 are in this sequence because first three sums of two consecutive nonsquares are 5, 8, 11 and 2, 3, 7 are primes.
		

Crossrefs

Programs

  • Mathematica
    Union[{2},Select[Table[2n^2-1,{n,0,1000}],PrimeQ],Select[Table[2n^2+1,{n,0,1000}],PrimeQ]] (* Ivan N. Ianakiev, Apr 24 2015 *)
    Module[{nn=11000,ns},ns=Total/@Partition[Select[Range[nn],!IntegerQ[Sqrt[#]]&],2,1]; Complement[ Prime[Range[PrimePi[Last[ns]]]],ns]] (* Harvey P. Dale, Mar 06 2024 *)
  • PARI
    a256917(maxp) = {
      ps=[2];
      k=1; while((t=2*k^2-1)<=maxp, k++; if(isprime(t), ps=setunion(ps, [t])));
      k=1; while((t=2*k^2+1)<=maxp, k++; if(isprime(t), ps=setunion(ps, [t])));
      ps
    }
    a256917(11000) \\ Colin Barker, Apr 23 2015
    
  • PARI
    list(lim)=my(v=List([2]),t); for(k=2,sqrtint((lim+1)\2), if(isprime(t=2*k^2-1), listput(v,t))); for(k=1,sqrtint((lim-1)\2), if(isprime(t=2*k^2+1), listput(v,t))); Set(v) \\ Charles R Greathouse IV, Apr 23 2015

A257163 Primes of the form 3n^2 + 2.

Original entry on oeis.org

2, 5, 29, 149, 509, 677, 1877, 3677, 8429, 9749, 11909, 13469, 17789, 22709, 27077, 28229, 45389, 46877, 53069, 70229, 72077, 81677, 100469, 102677, 114077, 128549, 141269, 154589, 180077, 192029, 195077, 207509, 223589, 230189, 261077, 312989, 340709, 352949, 395309, 399677, 426389
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 16 2015

Keywords

Comments

Two together with A027864(n).
Generated by n = 0, 1, 3, 7, 13, 15, 25, 35, 53, 57, ...

Examples

			2 is in this sequence because 3*0^2 + 2 = 2 and 2 is prime.
		

Crossrefs

Cf. A103564, A027864. Primes of the form k*n^2 + k - 1: A090698, this sequence, A121825, A201483, A201600, A201607, A201704.

Programs

  • Magma
    [a: n in [0..400] | IsPrime(a) where a is (3*n^2+2)];
    
  • Mathematica
    Select[Table[3 n^2 + 2, {n, 0, 400}], PrimeQ] (* Vincenzo Librandi, Apr 17 2015 *)
  • PARI
    select(isprime, vector(100, n, 3*n^2-6*n+5)) \\ Charles R Greathouse IV, Apr 17 2015
Showing 1-10 of 12 results. Next