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

A099468 Numbers n such that there are no primes < 2n in the sequence m(0)=n, m(k+1)=m(k)+4k.

Original entry on oeis.org

1, 21, 45, 51, 81, 213, 249, 315, 477, 525, 681, 891, 1143, 1221, 1851, 1965, 2415, 5133
Offset: 1

Views

Author

T. D. Noe, Oct 17 2004

Keywords

Comments

No others < 10^8. Note that 3 divides all these n > 1. This sequence is conjectured to be complete. Related to a question posed in A036468 by Zhang Ming-Zhi. Let r=2s+1 be an odd number. If n = (s+1)^2+s^2, then the sequence m(0)=n, m(k+1)=m(k)+4k for k=0,1,...s calculates the s+1 distinct sums of two squares (r-i)^2+i^2.

Examples

			45 is here because 45, 49, 57, 69 and 85 are all composite.
		

Crossrefs

Cf. A036468 (number of ways to represent 2n+1 as a+b with a^2+b^2 prime).

Programs

  • Mathematica
    lst={}; Do[n=m; found=False; k=0; While[n=n+4k; !found && n<2m, found=PrimeQ[n]; k++ ]; If[ !found, AppendTo[lst, m]], {m, 1, 10000, 2}]; lst

A102751 Numbers k such that 1 + (k-1)^2 and ((k-1)/2)^2 + ((k+1)/2)^2 = (1/2)*(k^2+1) are primes.

Original entry on oeis.org

3, 5, 11, 15, 25, 85, 95, 121, 131, 171, 181, 205, 231, 261, 271, 315, 441, 445, 471, 545, 571, 595, 715, 751, 781, 861, 921, 951, 1011, 1055, 1081, 1095, 1125, 1151, 1185, 1315, 1411, 1421, 1495, 1615, 1661, 1701, 2035, 2051, 2055, 2065, 2175, 2261, 2315
Offset: 1

Views

Author

Robin Garcia, Feb 09 2005

Keywords

Comments

Conjectured to be infinite.

Examples

			11 is a term because 10^2+1=101 and 5^2+6^2=(1/2)*(11^2+1)=61 are primes.
		

References

  • G. H. Hardy and W. M. Wright, Unsolved Problems Concerning Primes, Section 2.8 and Appendix 3 in An Introduction to the Theory of Numbers, 5th ed. Oxford, England: Oxford University Press, p. 19.
  • P. Ribenboim, The New Book of Prime Number Records, 3rd ed. New York: Springer-Verlag, pp. 206-208, 1996.

Crossrefs

Programs

  • Maple
    a:=proc(n) if isprime(1+(n-1)^2)=true and type((n^2+1)/2,integer)=true and isprime((n^2+1)/2)=true then n else fi end: seq(a(n),n=1..3000); # Emeric Deutsch, May 31 2005
  • Mathematica
    Select[Range[2,2500], PrimeQ[1+(#-1)^2]&&PrimeQ[(1/2)*(#^2+1)]&] (* James C. McMahon, Jan 10 2024 *)

Extensions

More terms from Emeric Deutsch, May 31 2005

A127079 Number of ways to represent prime(n) as a+b with a >= b > 0 and a^2+b^2 prime.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 4, 4, 4, 6, 5, 8, 9, 7, 7, 9, 9, 11, 11, 9, 11, 13, 15, 14, 14, 18, 16, 17, 16, 20, 18, 22, 18, 21, 23, 21, 24, 24, 22, 24, 22, 28, 30, 23, 27, 24, 29, 30, 30, 28, 29, 24, 28, 30, 34, 33, 36, 35, 31, 37, 32, 36, 37, 41, 42, 42, 42, 43, 42, 38, 34, 43, 38, 45, 44
Offset: 1

Views

Author

J. M. Bergot, Mar 24 2007

Keywords

Comments

Essentially A036468 restricted to the primes.
a(n) <= floor(prime(n)/2).

Examples

			prime(5) = 11 can be represented as 10+1, 9+2, 8+3, 7+4 and 6+5. Among 10^2+1^2 = 101, 9^2+2^2 = 85, 8^2+3^2 = 73, 7^2+4^2 = 65 and 6^2+5^2 = 61 are three primes, hence a(5) = 3.
		

Crossrefs

Cf. A036468.

Programs

  • Maple
    f:= proc(n) local a;
    add(charfcn[{true}](isprime(a^2 + (n-a)^2)), a=1..n/2)
    end proc:
    map(f, [seq(ithprime(i),i=1..100)]); # Robert Israel, Jun 03 2019
  • Mathematica
    Reap[Do[p = Prime[n]; c = 0; Do[b = p - a; If[PrimeQ[a^2 + b^2], c++], {a, 1, p/2}]; Sow[c], {n, 1, 75}]][[2, 1]] (* Jean-François Alcover, Aug 19 2020 *)
  • PARI
    {for(n=1, 75, p=prime(n); c=0; for(a=1, p\2, b=p-a; if(isprime(a^2+b^2), c++)); print1(c, ","))} /* Klaus Brockhaus, Mar 26 2007 */

Extensions

Edited and extended by Klaus Brockhaus, Mar 26 2007

A192056 a(n) = |{0

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 30 2012

Keywords

Comments

Conjecture: a(n)>0 for all n>2. Moreover, if n>2 is not among 12, 18, 105, 522, then there is 0
k^2+(n-k)^2-3(n-1 mod 2) is prime and also JacobiSymbol[k,p]=1 for any prime divisor p of n+3(n-1 mod 2).
This conjecture has been verified for n up to 2*10^8. It is stronger than Ming-Zhi Zhang's conjecture that any odd integer n>1 can be written as x+y (x,y>0) with x^2+y^2 prime (see A036468).

Examples

			a(33)=1 since 4^2+29^2=857 is prime and JacobiSymbol[4,33]=1.
a(24)=1 since 10^2+14^2-3=293 is prime and JacobiSymbol[10,24+3]=1.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=a[n]=Sum[If[PrimeQ[k^2+(n-k)^2-3Mod[n-1,2]]==True&&JacobiSymbol[k,n+3Mod[n-1,2]]==1,1,0],{k,1,(n-1)/2}]
    Do[Print[n," ",a[n]],{n,1,100}]

A220572 Number of ways to write 2n-1=x+y (x,y>=0) with x^18+3*y^18 prime.

Original entry on oeis.org

1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 4, 5, 4, 1, 2, 4, 1, 4, 1, 2, 1, 2, 1, 6, 1, 4, 2, 4, 3, 6, 3, 2, 4, 2, 5, 6, 4, 5, 4, 5, 5, 8, 7, 4, 7, 7, 6, 7, 4, 6, 7, 5, 6, 3, 11, 7, 1, 5, 3, 5, 6, 6, 10, 4, 13, 12, 9, 4, 9, 10, 5, 8, 3, 6, 7, 5, 4, 8, 13, 6, 3, 5, 5, 11, 6, 13, 4, 9, 10, 8, 12, 11, 8, 7, 10, 8, 7, 8, 8
Offset: 1

Author

Zhi-Wei Sun, Dec 16 2012

Keywords

Comments

Conjecture: a(n)>0 for every n=1,2,3,.... Moreover, any odd integer greater than 2092 can be written as x+y (x,y>0) with x-3, x+3 and x^18+3*y^18 all prime.
This has been verified for n up to 2*10^6.
Zhi-Wei Sun also made the following general conjecture: For each positive integer m, any sufficiently large odd integer n can be written as x+y (x,y>0) with x-3, x+3 and x^m+3*y^m all prime (and hence there are infinitely many primes in the form x^m+3*y^m). In particular, for m = 1, 2, 3, 4, 5, 6, 18 any odd integer greater than one can be written as x+y (x,y>0) with x^m+3*y^m prime, and for m =1, 2, 3 any odd integer n>15 can be written as x+y (x,y>0) with x-3, x+3 and x^m+3*y^m all prime.
Our computation suggests that for each m=7,...,20 any odd integer greater than 32, 10, 24, 30, 48, 36, 72, 146, 48, 48, 152, 2, 238, 84 respectively can be written as x+y (x,y>0) with x^m+3*y^m prime.

Examples

			a(3)=1 since 2*3-1=5=1+4 with 1^18+3*4^18=206158430209 prime.
		

Programs

  • Mathematica
    a[n_]:=a[n]=Sum[If[PrimeQ[k^18+3*(2n-1-k)^18]==True,1,0],{k,0,2n-1}]
    Do[Print[n," ",a[n]],{n,1,100}]

A231883 Number of ways to write n = x + y (x, y > 0) with x^2 + (n-2)*y^2 prime.

Original entry on oeis.org

0, 0, 2, 2, 2, 2, 4, 1, 5, 2, 5, 1, 4, 4, 3, 1, 7, 2, 3, 3, 6, 7, 3, 2, 6, 2, 9, 3, 8, 3, 10, 3, 5, 8, 8, 4, 7, 5, 13, 4, 12, 6, 7, 6, 8, 10, 14, 4, 17, 9, 9, 6, 9, 5, 8, 5, 9, 7, 12, 10, 11, 7, 11, 8, 12, 4, 13, 3, 22, 6, 16, 7, 14, 8, 10, 4, 14, 4, 17, 9, 16, 6, 12, 11, 14, 4, 21, 4, 21, 8, 18, 3, 11, 14, 23, 7, 22, 5, 23, 8
Offset: 1

Author

Zhi-Wei Sun, Nov 21 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 2, and a(n) = 1 only for n = 8, 12, 16. Moreover, if m and n are positive integers with m >= max{2, n-1} and gcd(m, n+1) = 1, then x^2 + n*y^2 is prime for some positive integers x and y with x + y = m, except for the case m = n + 3 = 29.
(ii) Let m and n be integers greater than one with m >= (n-1)/2 and gcd(m, n-1) = 1. Then x + n*y is prime for some positive integers x and y with x + y = m.
(iii) Any integer n > 3 not equal to 12 or 16 can be written as x + y (x, y > 0) with (n-2)*x - y and (n-2)*x^2 + y^2 both prime.

Examples

			 a(8) = 1 since 8 = 5 + 3 with 5^2 + (8-2)*3^2 = 79 prime.
a(12) = 1 since 12 = 11 + 1 with 11^2 + (12-2)*1^2 = 131 prime.
a(16) = 1 since 16 = 15 + 1 with 15^2 + (16-2)*1^2 = 239 prime.
		

Programs

  • Mathematica
    a[n_]:=Sum[If[PrimeQ[x^2+(n-2)*(n-x)^2],1,0],{x,1,n-1}]
    Table[a[n],{n,1,100}]

A115397 Erroneous version of A218656.

Original entry on oeis.org

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

Author

Reinhard Zumkeller, Mar 08 2006

Keywords

Examples

			n=6: 2*6+1 = 13 = 2+11 = 5+8 = 6+7 and
prime(1717)=14657, prime(636)=4721, prime(516)=3697,
a(6) = #{14657=2^4+11^4, 4721=5^4+8^4, 3697=6^4+7^4} = 3.
		

Crossrefs

Previous Showing 11-17 of 17 results.