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

A046921 Number of ways to express 2n+1 as p+2a^2; p = 1 or prime, a >= 0.

Original entry on oeis.org

1, 2, 2, 2, 2, 2, 3, 2, 1, 4, 3, 2, 3, 1, 2, 4, 2, 2, 4, 3, 2, 3, 3, 2, 4, 3, 2, 5, 1, 2, 6, 3, 1, 3, 4, 2, 5, 4, 2, 6, 3, 2, 4, 2, 3, 6, 2, 1, 4, 3, 4, 6, 4, 2, 6, 5, 2, 6, 3, 2, 5, 1, 2, 3, 5, 4, 5, 4, 1, 8, 4, 1, 6, 3, 2, 6, 2, 2, 6, 6, 1, 4, 5, 3, 7, 4, 3, 6, 2, 3, 10, 2, 3, 4, 4, 3, 3, 4, 2
Offset: 0

Views

Author

Keywords

Comments

Goldbach conjectured this sequence is never zero.
The only zero terms appear to be for the odd numbers 5777 and 5993. - T. D. Noe, Aug 23 2008

Crossrefs

Programs

Formula

a(n) = A046920(A005408(n)). - Reinhard Zumkeller, Apr 03 2013

A046923 Number of ways to express 2n+1 as p+2a^2; p prime, a >= 0.

Original entry on oeis.org

0, 1, 2, 2, 1, 2, 3, 2, 1, 3, 3, 2, 3, 1, 2, 4, 1, 2, 4, 3, 2, 3, 3, 2, 4, 2, 2, 5, 1, 2, 6, 3, 1, 3, 4, 2, 4, 4, 2, 6, 3, 2, 4, 2, 3, 6, 2, 1, 4, 2, 4, 6, 4, 2, 6, 5, 2, 6, 3, 2, 5, 1, 2, 3, 4, 4, 5, 4, 1, 8, 4, 1, 6, 3, 2, 6, 2, 2, 6, 6, 1, 3, 5, 3, 7, 4, 3, 6, 2, 3, 10, 2, 3, 4, 4, 3, 3, 4, 2
Offset: 0

Views

Author

Keywords

Comments

The only zero terms appear to be for the odd numbers 1, 5777 and 5993. - T. D. Noe, Aug 23 2008
a(n) = A046922(A005408(n)). - Reinhard Zumkeller, Apr 03 2013

Crossrefs

Programs

Extensions

Definition corrected by T. D. Noe, Aug 23 2008

A042978 Stern primes: primes not of the form p + 2b^2 for p prime and b > 0.

Original entry on oeis.org

2, 3, 17, 137, 227, 977, 1187, 1493
Offset: 1

Views

Author

Keywords

Comments

No others < 1299709. Are there any others? Related to a conjecture of Goldbach.
The next element of the sequence, if it exists, is larger than 10^9 ; see A060003. - M. F. Hasler, Nov 16 2007
The next element, if it exists, is larger than 2*10^13. - Benjamin Chaffin, Mar 28 2008
Does not equal A000040(k) + A001105(j) for all k & j >0. - Robert G. Wilson v, Sep 07 2012

References

  • Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See p. 226.
  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 137, p. 46, Ellipses, Paris 2008.
  • L. E. Dickson, History of the theory of Numbers, vol. 1, page 424.

Crossrefs

Apart from the first term, a subsequence of A060003.

Programs

  • Maple
    N:= 10^6: # to check primes up to N
    P:= select(isprime, {2,seq(i,i=3..N,2)}):
    S:= {seq(2*b^2,b=1..floor(sqrt(N/2)))}:
    P minus {seq(seq(p+s,p=P),s=S)}; # Robert Israel, Jan 19 2016
  • Mathematica
    fQ[n_] := Block[{k = Floor[ Sqrt[ n/2]]}, While[k > 0 && !PrimeQ[n - 2*k^2], k--]; k == 0]; Select[ Prime[Range[238]], fQ] (* Robert G. Wilson v, Sep 07 2012 *)
  • PARI
    forprime( n=1,default(primelimit), for(s=1,sqrtint(n\2), if(isprime(n-2*s^2),next(2)));print(n)) \\ M. F. Hasler, Nov 16 2007
    
  • PARI
    forprime(p=2,4e9,forstep(k=sqrt(p\2),1,-1,if(isprime(p-2*k^2),next(2)));print1(p", ")) \\ Charles R Greathouse IV, Aug 04 2011

A046920 Number of ways to express n as p+2a^2; p = 1 or prime, a >= 0.

Original entry on oeis.org

1, 1, 2, 1, 2, 0, 2, 0, 2, 1, 2, 0, 3, 0, 2, 0, 1, 0, 4, 1, 3, 0, 2, 0, 3, 0, 1, 0, 2, 0, 4, 0, 2, 1, 2, 0, 4, 0, 3, 0, 2, 0, 3, 0, 3, 0, 2, 0, 4, 0, 3, 1, 2, 0, 5, 0, 1, 0, 2, 0, 6, 0, 3, 0, 1, 0, 3, 0, 4, 0, 2, 0, 5, 1, 4, 0, 2, 0, 6, 0, 3, 0, 2, 0, 4, 0, 2, 0, 3, 0, 6, 0, 2, 0, 1, 0, 4, 0, 3
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a046920 n = length $ filter ((\x -> x == 1 || a010051 x == 1) . (n -)) $
                                takeWhile (< n) a001105_list
    -- Reinhard Zumkeller, Apr 03 2013

A143539 Number of ways to express 2n-1 as p+2a^2; p prime, a > 0.

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 2, 2, 0, 2, 3, 1, 3, 1, 1, 3, 1, 2, 3, 3, 1, 2, 3, 1, 4, 2, 1, 5, 1, 1, 5, 3, 1, 2, 4, 1, 3, 4, 2, 5, 3, 1, 4, 2, 2, 6, 2, 1, 3, 2, 3, 5, 4, 1, 5, 5, 1, 6, 3, 2, 5, 1, 2, 2, 4, 3, 5, 4, 0, 7, 4, 1, 6, 3, 1, 5, 2, 2, 5, 6, 1, 2, 5, 2, 7, 4, 2, 6, 2, 2, 9, 2, 3, 4, 4, 2, 2, 4, 1, 9, 5, 3, 5, 5, 3
Offset: 1

Views

Author

T. D. Noe, Aug 23 2008

Keywords

Comments

Similar to A046921 and A046923. Sequence A060003 lists the odd numbers having no representations.

Examples

			a(11)=3 because 21 = 19+2*1^2 = 13+2*2^2 = 3+2*3^2.
		

Programs

  • Mathematica
    Table[cnt=0; Do[If[PrimeQ[n-2*k^2], cnt++ ], {k,Floor[Sqrt[n/2]]}]; cnt, {n,1,20000,2}]

A046922 Number of ways to express n as p+2a^2; p prime, a >= 0.

Original entry on oeis.org

0, 1, 1, 1, 2, 0, 2, 0, 1, 1, 2, 0, 3, 0, 2, 0, 1, 0, 3, 1, 3, 0, 2, 0, 3, 0, 1, 0, 2, 0, 4, 0, 1, 1, 2, 0, 4, 0, 3, 0, 2, 0, 3, 0, 3, 0, 2, 0, 4, 0, 2, 1, 2, 0, 5, 0, 1, 0, 2, 0, 6, 0, 3, 0, 1, 0, 3, 0, 4, 0, 2, 0, 4, 1, 4, 0, 2, 0, 6, 0, 3, 0, 2, 0, 4, 0, 2, 0, 3, 0, 6, 0, 2, 0, 1, 0, 4, 0, 2
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a046922 n = sum $ map (a010051 . (n -)) $ takeWhile (< n) a001105_list
    -- Reinhard Zumkeller, Apr 03 2013

A346368 Odd numbers that can be written in a single way as 2*k^2+p, k>0, p prime.

Original entry on oeis.org

5, 7, 9, 11, 23, 27, 29, 33, 41, 47, 53, 57, 59, 65, 71, 83, 95, 107, 113, 123, 143, 149, 161, 197, 233, 239, 257, 281, 287, 317, 323, 347, 383, 407, 413, 443, 449, 569, 743, 773, 785, 863, 1227, 1367, 1415, 1703, 1787, 2123, 2507, 2933, 3317, 3515, 3713, 4673, 5987, 6797
Offset: 1

Views

Author

Bernard Pitie, Jul 14 2021

Keywords

Comments

The next element, if it exists, is greater than 10^8.

Crossrefs

Programs

  • PARI
    isok(m) = (m>3) && (m % 2) && (sum(i=1, sqrtint((m-3)/2), isprime(m-2*i^2)) == 1); \\ Michel Marcus, Jul 22 2021
Showing 1-7 of 7 results.