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 17 results. Next

A005277 Nontotients: even numbers k such that phi(m) = k has no solution.

Original entry on oeis.org

14, 26, 34, 38, 50, 62, 68, 74, 76, 86, 90, 94, 98, 114, 118, 122, 124, 134, 142, 146, 152, 154, 158, 170, 174, 182, 186, 188, 194, 202, 206, 214, 218, 230, 234, 236, 242, 244, 246, 248, 254, 258, 266, 274, 278, 284, 286, 290, 298, 302, 304, 308, 314, 318
Offset: 1

Views

Author

Keywords

Comments

If p is prime then the following two statements are true. I. 2p is in the sequence iff 2p+1 is composite (p is not a Sophie Germain prime). II. 4p is in the sequence iff 2p+1 and 4p+1 are composite. - Farideh Firoozbakht, Dec 30 2005
Another subset of nontotients consists of the numbers j^2 + 1 such that j^2 + 2 is composite. These numbers j are given in A106571. Similarly, let b be 3 or a number such that b == 1 (mod 4). For any j > 0 such that b^j + 2 is composite, b^j + 1 is a nontotient. - T. D. Noe, Sep 13 2007
The Firoozbakht comment can be generalized: Observe that if k is a nontotient and 2k+1 is composite, then 2k is also a nontotient. See A057192 and A076336 for a connection to Sierpiński numbers. This shows that 271129*2^j is a nontotient for all j > 0. - T. D. Noe, Sep 13 2007

Examples

			There are no values of m such that phi(m)=14, so 14 is a term of the sequence.
		

References

  • Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See Table 44 at p. 91.
  • R. K. Guy, Unsolved Problems in Number Theory, B36.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See p. 91.

Crossrefs

See A007617 for all numbers k (odd or even) such that phi(m) = k has no solution.
All even numbers not in A002202. Cf. A000010.

Programs

  • Haskell
    a005277 n = a005277_list !! (n-1)
    a005277_list = filter even a007617_list
    -- Reinhard Zumkeller, Nov 22 2015
    
  • Magma
    [n: n in [2..400 by 2] | #EulerPhiInverse(n) eq 0]; // Marius A. Burtea, Sep 08 2019
  • Maple
    A005277 := n -> if type(n,even) and invphi(n)=[] then n fi: seq(A005277(i),i=1..318); # Peter Luschny, Jun 26 2011
  • Mathematica
    searchMax = 320; phiAnsYldList = Table[0, {searchMax}]; Do[phiAns = EulerPhi[m]; If[phiAns <= searchMax, phiAnsYldList[[phiAns]]++ ], {m, 1, searchMax^2}]; Select[Range[searchMax], EvenQ[ # ] && (phiAnsYldList[[ # ]] == 0) &] (* Alonso del Arte, Sep 07 2004 *)
    totientQ[m_] := Select[ Range[m +1, 2m*Product[(1 - 1/(k*Log[k]))^(-1), {k, 2, DivisorSigma[0, m]}]], EulerPhi[#] == m &, 1] != {}; (* after Jean-François Alcover, May 23 2011 in A002202 *) Select[2 Range@160, ! totientQ@# &] (* Robert G. Wilson v, Mar 20 2023 *)
  • PARI
    is(n)=n%2==0 && !istotient(n) \\ Charles R Greathouse IV, Mar 04 2017
    

Formula

a(n) = 2*A079695(n). - R. J. Mathar, Sep 29 2021
{k: k even and A014197(k) = 0}. - R. J. Mathar, Sep 29 2021

Extensions

More terms from Jud McCranie, Oct 13 2000

A067201 Numbers k such that k^2 + 2 is prime.

Original entry on oeis.org

0, 1, 3, 9, 15, 21, 33, 39, 45, 57, 81, 99, 105, 111, 117, 123, 147, 171, 219, 225, 237, 243, 249, 255, 273, 297, 303, 309, 321, 345, 351, 363, 369, 375, 387, 417, 423, 429, 441, 447, 453, 477, 501, 513, 549, 555, 561, 573, 603, 609, 651, 675, 681, 699, 711, 753
Offset: 1

Views

Author

Benoit Cloitre, Feb 19 2002

Keywords

Comments

All terms > 1 are divisible by 3. - Robert Israel, Sep 05 2014

Crossrefs

Equals 6*A056900(n-2) + 3, n>1.
Other sequences of the type "Numbers k such that k^2 + i is prime": A005574 (i=1), this sequence (i=2), A049422 (i=3), A007591 (i=4), A078402 (i=5), A114269 (i=6), A114270 (i=7), A114271 (i=8), A114272 (i=9), A114273 (i=10), A114274 (i=11), A114275 (i=12).

Programs

  • Maple
    select(t -> isprime(t^2+2), [0,1,seq(3*i,i=1..1000)]); # Robert Israel, Sep 05 2014
  • Mathematica
    lst={};Do[If[PrimeQ[n^2+2], AppendTo[lst, n]], {n, 3*10^2}];lst (* Vladimir Joseph Stephan Orlovsky, Aug 21 2008 *)
    Join[{0, 1}, Select[Range[3, 1000, 6], PrimeQ[#^2 + 2] &]] (* Zak Seidov, Jan 30 2014 *)
  • PARI
    select(n -> isprime(n^2+2),[1..500]) \\ Edward Jiang, Sep 05 2014

A106564 Perfect squares which are not the difference of two primes.

Original entry on oeis.org

25, 49, 121, 169, 289, 361, 529, 625, 729, 841, 961, 1225, 1369, 1681, 1849, 2209, 2401, 2601, 2809, 3025, 3481, 3721, 3969, 4225, 4489, 4761, 5041, 5329, 5625, 5929, 6241, 6889, 7225, 7569, 7921, 8281, 8649, 9025, 9409, 10201, 10609, 11449, 11881
Offset: 1

Views

Author

Alexandre Wajnberg, May 09 2005

Keywords

Comments

Squares in A269345; see also the Mathematica code. - Waldemar Puszkarz, Feb 27 2016
It is conjectured (see A020483) that every even number is a difference of primes, and this is known to be true for even numbers < 10^11. If so,this sequence consists of the odd squares n such that n+2 is composite. - Robert Israel, Feb 28 2016

Examples

			a(2)=49 because it is the second perfect square which is impossible to obtain subtracting a prime from another one.
64 is not in the sequence because 64=67-3 (difference of two primes).
		

Crossrefs

Programs

  • Magma
    [n^2: n in [1..150]| not IsPrime(n^2+2) and n mod 2 eq 1]; // Vincenzo Librandi, Feb 28 2016
  • Maple
    remove(t -> isprime(t+2), [seq(i^2, i=1..1000, 2)]); # Robert Israel, Feb 28 2016
  • Mathematica
    With[{lst=Union[(#[[2]]-#[[1]])&/@Subsets[Prime[Range[2000]], {2}]]}, Select[Range[140]^2, !MemberQ[lst,#]&]] (* Harvey P. Dale, Jan 04 2011 *)
    Select[Range[1,174,2]^2, !PrimeQ[#+2]&]
    Select[Select[Range[30000], OddQ[#]&& !PrimeQ[#]&& !PrimeQ[#+2]&], IntegerQ[Sqrt[#]]&] (* Waldemar Puszkarz, Feb 27 2016 *)
  • PARI
    for(n=1, 174, n%2==1&&!isprime(n^2+2)&&print1(n^2, ", ")) \\ Waldemar Puszkarz, Feb 27 2016
    

Formula

n^2 - A106546 with 0's removed.

Extensions

Extended by Ray Chandler, May 12 2005

A106575 Perfect squares which are both the sum and the difference of two primes.

Original entry on oeis.org

4, 9, 16, 36, 64, 81, 100, 144, 196, 225, 256, 324, 400, 441, 484, 576, 676, 784, 900, 1024, 1089, 1156, 1296, 1444, 1600, 1764, 1936, 2116, 2304, 2500, 2704, 2916, 3136, 3364, 3600, 3844, 4096, 4356, 4624, 4900, 5184, 5476, 5776, 6084, 6400, 6724, 7056
Offset: 1

Views

Author

Alexandre Wajnberg, May 09 2005

Keywords

Comments

Equals A106548 with 0's removed.
Appears to contain all even squares.
By well-known conjectures, every even integer > 2 is both the sum and the difference of two primes; this would be a special case. - Franklin T. Adams-Watters, Sep 13 2015

Examples

			2^2 = 4 is in the sequence because it is the sum of two primes (2+2) and the difference of two primes (7-3). 10^2 = 100 is in the sequence because it is the sum and the difference of two primes: 97+3 (or 89+11) and 103-3. 11^2 = 121 is not in the sequence because it is neither the sum nor the difference of two primes. 13^2 = 169 is the sum of two primes (167+2), but it doesn't figure here since it is not the difference of two primes.
		

Crossrefs

Programs

  • Magma
    [ s: n in [1..85] | exists(t){ k: k in [1..s] | s-k gt 0 and IsPrime(k) and IsPrime(s-k) } and exists(u){ k: k in [1..s] | IsPrime(k) and IsPrime(s+k) } where s is n^2 ]; /* Klaus Brockhaus, Nov 17 2010 */

Extensions

Extended by Ray Chandler, May 12 2005
Edited by Klaus Brockhaus, Nov 17 2010

A106544 Perfect squares n^2 which are not the sum of two primes (otherwise 0).

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 121, 0, 0, 0, 0, 0, 289, 0, 0, 0, 0, 0, 529, 0, 625, 0, 0, 0, 0, 0, 961, 0, 0, 0, 0, 0, 0, 0, 1521, 0, 1681, 0, 0, 0, 2025, 0, 0, 0, 0, 0, 2601, 0, 2809, 0, 0, 0, 3249, 0, 3481, 0, 0, 0, 0, 0, 4225, 0, 4489, 0, 0, 0, 0, 0, 5329, 0, 0, 0, 0, 0, 6241, 0, 6561
Offset: 1

Views

Author

Alexandre Wajnberg, May 08 2005

Keywords

Comments

For odd n, n^2 is odd so the two primes must be opposite in parity. Lesser prime must be 2 and greater prime must be n^2-2. Thus for odd n, n^2 is the sum of two primes iff n^2-2 is prime. - Ray Chandler, May 12 2005

Examples

			a(10)=0 because 10^2=100=97+3 (sum of two primes)
a(11)=11^2=121, which is impossible to obtain summing two primes.
		

Crossrefs

Formula

a(n) = n^2 - A106545(n).

Extensions

Extended by Ray Chandler, May 12 2005

A106548 Perfect squares n^2 which are both the sum and the difference of two primes (otherwise 0).

Original entry on oeis.org

0, 4, 9, 16, 0, 36, 0, 64, 81, 100, 0, 144, 0, 196, 225, 256, 0, 324, 0, 400, 441, 484, 0, 576, 0, 676, 0, 784, 0, 900, 0, 1024, 1089, 1156, 0, 1296, 0, 1444, 0, 1600, 0, 1764, 0, 1936, 0, 2116, 0, 2304, 0, 2500, 0, 2704, 0, 2916, 0, 3136, 0, 3364, 0, 3600, 0, 3844, 0
Offset: 1

Views

Author

Alexandre Wajnberg, May 08 2005

Keywords

Crossrefs

Formula

a(n) = Min(A106545(n), A106546(n)).

Extensions

Extended by Ray Chandler, May 12 2005

A106562 Perfect squares which are not the sum of two primes.

Original entry on oeis.org

1, 121, 289, 529, 625, 961, 1521, 1681, 2025, 2601, 2809, 3249, 3481, 4225, 4489, 5329, 6241, 6561, 6889, 7225, 7569, 8281, 9025, 9409, 9801, 10201, 11025, 11881, 12321, 12769, 13225, 15129, 15625, 16641, 17689, 18769, 19881, 20449, 21609
Offset: 1

Views

Author

Alexandre Wajnberg, May 09 2005

Keywords

Examples

			a(2)=121 because it is the second perfect square which is impossible to obtain summing two primes.
100 is not in the sequence because 100=97+3 (sum of two primes).
		

Crossrefs

Programs

Formula

A106544 with 0's removed.

Extensions

Extended by Ray Chandler, May 12 2005

A106573 Perfect squares which are neither the sum nor the difference of two primes.

Original entry on oeis.org

121, 289, 529, 625, 961, 1681, 2601, 2809, 3481, 4225, 4489, 5329, 6241, 6889, 7225, 7569, 8281, 9025, 9409, 10201, 11881, 12769, 13225, 15625, 16641, 17689, 18769, 19881, 20449, 22201, 22801, 23409, 24649, 25281, 26569, 27225, 27889, 30625
Offset: 1

Views

Author

Alexandre Wajnberg, May 09 2005

Keywords

Examples

			a(2)=289 because it is the second perfect square which is impossible to obtain adding a prime to - or subtracting from - another one. 64 is not in the sequence because 64=67-3, a difference of two primes.
		

Crossrefs

Formula

A106547 with 0's removed.

Extensions

Corrected and extended by Ray Chandler, May 12 2005

A106577 Indices n of perfect squares n^2 which are both the sum and the difference of two primes.

Original entry on oeis.org

2, 3, 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 26, 28, 30, 32, 33, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 117, 118, 120, 122
Offset: 1

Views

Author

Alexandre Wajnberg, May 09 2005

Keywords

Examples

			a(3)=4 because the third square which is the sum and the difference of two primes (16=4^2) is the 4th one in
the succession of the perfect squares (thus: index 4).
		

Crossrefs

Formula

a(n) = SQRT(A106575(n)).

Extensions

Extended by Ray Chandler, May 12 2005

A106546 a(n) = n^2 if n^2 is the difference of two primes, otherwise a(n) = 0.

Original entry on oeis.org

1, 4, 9, 16, 0, 36, 0, 64, 81, 100, 0, 144, 0, 196, 225, 256, 0, 324, 0, 400, 441, 484, 0, 576, 0, 676, 0, 784, 0, 900, 0, 1024, 1089, 1156, 0, 1296, 0, 1444, 1521, 1600, 0, 1764, 0, 1936, 2025, 2116, 0, 2304, 0, 2500, 0, 2704, 0, 2916, 0, 3136, 3249, 3364, 0, 3600, 0
Offset: 1

Views

Author

Alexandre Wajnberg, May 08 2005

Keywords

Comments

For odd n, n^2 is odd so the two primes must be opposite in parity. Lesser prime must be 2 and greater prime must be n^2+2. Thus for odd n, n^2 is the difference of two primes iff n^2+2 is prime.
An odd difference can be obtained only by subtracting 2 from some prime > 2, hence a(n) = 0 if n is odd and n^2+2 is composite.

Examples

			a(6) = 6^2 = 36 = 41-5 (two primes).
a(5) = 0 and a(7) = 0 because 5^2+2 =27 = 3*3*3 and 7^2+2 =51 = 3*17 are composite.
		

Crossrefs

Formula

n^2 - A106546 gives perfect squares which are not the difference of two primes (otherwise 0).

Extensions

Edited and extended by Klaus Brockhaus and Ray Chandler, May 12 2005
Showing 1-10 of 17 results. Next