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

A349660 Numbers which are the sum of a prime and the square of the next prime.

Original entry on oeis.org

11, 28, 54, 128, 180, 302, 378, 548, 864, 990, 1400, 1718, 1890, 2252, 2856, 3534, 3780, 4550, 5108, 5400, 6314, 6968, 8004, 9498, 10298, 10710, 11552, 11988, 12878, 16242, 17288, 18900, 19458, 22340, 22950, 24800, 26726, 28052, 30096, 32214, 32940, 36662
Offset: 1

Views

Author

Karl-Heinz Hofmann, Nov 24 2021

Keywords

Examples

			a(2) = 3 + 5^2 = 28; a(3) = 5 + 7^2 = 54.
		

Crossrefs

Programs

  • Mathematica
    nterms=100;Table[Prime[n]+Prime[n+1]^2,{n,nterms}] (* Paolo Xausa, Nov 24 2021 *)
  • PARI
    a(n) = prime(n) + prime(n+1)^2; \\ Michel Marcus, Nov 24 2021
  • Python
    from sympy import sieve;
    for n in range(1,10001): print(sieve[n] + sieve[n+1]**2)
    

Formula

a(n) = prime(n) + prime(n+1)^2.
a(n) = A000040(n) + A001248(n+1).
a(n) = A036690(n+1) - A001223(n).
a(n) = A001043(n) + A036689(n+1). - Michel Marcus, Nov 24 2021

A350012 Number of ways to write n as 4*x^4 + y^2 + (z^2 + 4^w)/2 with x,y,z,w nonnegative integers.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 08 2021

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0.
This is a new refinement of Lagrange's four-square theorem since (x^2 + y^2)/2 = ((x+y)/2)^2 + ((x-y)/2)^2. We have verified the conjecture for n up to 10^6.
See also A349661 for a similar conjecture.
We also have some other conjectures of such a type.

Examples

			a(1) = 4*0^4 + 0^2 + (1^2 + 4^0)/2.
a(3) = 1 with 3 = 4*0^4 + 1^2 + (0^2 + 4)/2.
a(4) = 1 with 4 = 4*0^4 + 0^2 + (2^2 + 4)/2.
a(7) = 1 with 7 = 4*1^4 + 1^2 + (0^2 + 4)/2.
a(71) = 1 with 71 = 4*1^4 + 3^2 + (10^2 + 4^2)/2.
a(92) = 1 with 92 = 4*1^4 + 6^2 + (10^2 + 4)/2.
a(167) = 1 with 167 = 4*1^4 + 9^2 + (10^2 + 4^3)/2.
a(271) = 1 with 271 = 4*1^4 + 11^2 + (6^2 + 4^4)/2.
a(316) = 1 with 316 = 4*1^4 + 4^2 + (24^2 + 4^2)/2.
a(4796) = 1 with 4796 = 4*5^4 + 36^2 + (44^2 + 4^3)/2.
a(14716) = 1 with 14716 = 4*5^4 + 4^2 + (156^2 + 4^3)/2.
a(24316) = 1 with 24316 = 4*3^4 + 84^2 + (184^2 + 4^2)/2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    tab={};Do[r=0;Do[If[SQ[2(n-4x^4-y^2)-4^z],r=r+1],{x,0,((n-1)/4)^(1/4)},{y,0,Sqrt[n-1-4x^4]},{z,0,Log[4,2(n-4x^4-y^2)]}];tab=Append[tab,r],{n,1,100}];Print[tab]

A350021 Number of ways to write n as w^4 + x^2 + y^2 + z^2 with x - y a power of two (including 2^0 = 1).

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 08 2021

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0.
This is a new refinement of Lagrange's four-square theorem, and we have verified it for n up to 10^6.
If x - y = 2^k, then x^2 + y^2 = ((x+y)^2 + (2^k)^2)/2 and x + y >= 2^k. So the above conjecture implies the conjecture in A349661.
In his 2017 JNT paper, the author proved that each n = 0,1,2,... can be written as w^4 + x^2 + y^2 + z^2 with w,x,y,z nonnegative integers.
In his 2019 IJNT paper, the author proved that any positive integer can be written as w^2 + x^2 + y^2 + z^2 with w,x,y,z nonnegative integers such that x - y is a power of two (including 2^0 = 1).

Examples

			a(3) = 1 with 3 = 1^4 + 1^2 + 0^2 + 1^2 and 1 - 0 = 2^0.
a(4) = 1 with 4 = 0^4 + 2^2 + 0^2 + 0^2 and  2 - 0 = 2^1.
a(7) = 1 with 7 = 1^4 + 2^2 + 1^2 + 1^2 and 2 - 1 = 2^0.
a(8) = 1 with 8 = 0^4 + 2^2 + 0^2 + 2^2 and 2 - 0 = 2^1.
a(12) = 1 with 12 = 1^4 + 3^2 + 1^2 + 1^2 and 3 - 1 = 2^1.
a(19) = 1 with 19 = 0^4 + 3^2 + 1^2 + 3^2 and 3 - 1 = 2^1.
a(28) = 1 with 28 = 1^4 + 5^2 + 1^2 + 1^2 and 5 - 1 = 2^2.
a(47) = 1 with 47 = 1^4 + 3^2 + 1^2 + 6^2 and 3 - 1 = 2^1.
a(55) = 1 with 55 = 1^4 + 2^2 + 1^2 + 7^2 and 2 - 1 = 2^0.
a(88) = 1 with 88 = 0^4 + 6^2 + 4^2 + 6^2 and 6 - 4 = 2^1.
a(103) = 1 with 103 = 3^4 + 3^2 + 2^2 + 3^2 and 3 - 2 = 2^0.
a(193) = 1 with 193 = 2^4 + 8^2 + 7^2 + 8^2 and 8 - 7 = 2^0.
a(439) = 1 with 439 = 3^4 + 5^2 + 3^2 + 18^2 and 5 - 3 = 2^1.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    PowQ[n_]:=PowQ[n]=IntegerQ[Log[2,n]];
    tab={};Do[r=0;Do[If[SQ[n-w^4-x^2-y^2]&&PowQ[y-x],r=r+1],{w,0,(n-1)^(1/4)},{x,0,Sqrt[(n-w^4)/2]},{y,x+1,Sqrt[n-w^4-x^2]}];tab=Append[tab,r],{n,1,100}];Print[tab]
Showing 1-3 of 3 results.