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.

User: Steven Lu

Steven Lu's wiki page.

Steven Lu has authored 19 sequences. Here are the ten most recent ones:

A382863 a(2*k-1) and a(2*k) are a pair of prime numbers where 9*a(2*k-1) and 8*a(2*k) are neighboring integers.

Original entry on oeis.org

17, 19, 47, 53, 79, 89, 97, 109, 113, 127, 223, 251, 239, 269, 241, 271, 337, 379, 353, 397, 383, 431, 433, 487, 463, 521, 607, 683, 673, 757, 719, 809, 863, 971, 881, 991, 1087, 1223, 1153, 1297, 1279, 1439, 1297, 1459, 1327, 1493, 1361, 1531, 1423, 1601
Offset: 1

Author

Steven Lu, Apr 07 2025

Keywords

Examples

			a(5) = 79 and a(6) = 89 are such a pair, because 79*9=711 and 89*8=712 are neighboring integers.
		

Programs

  • Mathematica
    Flatten[{#, FirstCase[{(9 # + 1)/8, (9 # - 1)/8}, _Integer]} & /@ Select[Prime /@ Range[225], PrimeQ[(9 # + 1)/8] || PrimeQ[(9 # - 1)/8] &]]

A382546 Positive integers whose prime factors are all in A219528.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75
Offset: 1

Author

Steven Lu, Mar 31 2025

Keywords

Crossrefs

Cf. A219528.

Programs

  • Mathematica
    Select[Range[75], And @@ Table[SubsetQ[{2, 3}, First /@ FactorInteger[p + 1]] || SubsetQ[{2, 3}, First /@ FactorInteger[p - 1]], {p, First /@ FactorInteger[#]}] &]

Formula

Sum_{n>=1} 1/a(n) = 1/Product_{p in A219528} (1-1/p) = 7.52982574262479641306... . - Amiram Eldar, Apr 14 2025

A382066 a(n) = Sum_{k=1..prime(n)-1} (-k/prime(n)) * 3^(k-1) / 2, where (p/q) is the Legendre symbol of p and q.

Original entry on oeis.org

1, 8, 151, 8083, 70568, 8910416, 39392803, 7701058213, 2325990648824, 43563061207573, 19999898090377928, 2566793589644124992, 10627327735475477203, 2179055220073884519235, 630486036620986837882904, 646895254841829205782412249, 5802709167332592724735012664
Offset: 2

Author

Steven Lu, Mar 14 2025

Keywords

Comments

All terms are integers since Sum_{k=1..p-1} (-k/p) * 3^(k-1) is even for any odd prime p.

Programs

  • Mathematica
    Table[Sum[KroneckerSymbol[-i, q] 3^(i - 1), {i, q - 1}], {q, Prime /@ Range[2, 18]}]/2

A382035 a(n) is the smallest prime q such that q + prime(n) is of form 10^k or 2*10^k, or 0 if no such prime exists.

Original entry on oeis.org

0, 7, 5, 3, 89, 7, 3, 181, 977, 71, 1999969, 163, 59, 157, 53, 47, 41, 139, 1933, 29, 127, 199921, 17, 11, 3, 999999999899, 97, 999999893, 19891, 887, 73, 9999999999999999999869, 863, 61, 9851, 1999999999849, 43, 37, 9833, 827, 821, 19, 809, 7, 3, 1801, 1789
Offset: 1

Author

Steven Lu, Mar 12 2025

Keywords

Comments

a(1) is not the only term equal to 0.
For example, a(37145)=0, since prime(37145)=442609, and:
10^k - 442609 is a multiple of 3, for k>=6,
2*10^(2*k) - 442609 is a multiple of 11, for k>=3,
2*10^(6*k+1) - 442609 is a multiple of 7, for k>=1,
2*10^(6*k+3) - 442609 is a multiple of 13, for k>=1,
2*10^(6*k+5) - 442609 is a multiple of 37, for k>=1.

Examples

			For n=11 (prime(n)=31):
For all positive integer k, 10^k-31 is multiple of 3.
200 - 31 = 169 = 13 * 13
2000 - 31 = 1969 = 11 * 179
20000 - 31 = 19969 = 19 * 1051
200000 - 31 = 199969 = 7 * 7 * 7 * 11 * 53
2000000 - 31 = 1999969 is a prime number.
thus a(11) = 1999969.
		

Crossrefs

Cf. A191474 (base 2 version of this sequence).

Programs

  • Mathematica
    Table[If[MissingQ[#], 0, # - Prime[i]] &@SelectFirst[Flatten[Table[{10^j, 2 10^j}, {j, 100}]], # > Prime[i] && PrimeQ[# - Prime[i]] &], {i, 1, 47}]

A381287 a(n) is the smallest nonnegative number congruent to k modulo prime(k)^(n-k+1) for k=1..n.

Original entry on oeis.org

1, 5, 353, 65153, 119966753, 3050486978753, 563678198162618753, 15413934869729743026218753, 1710386933322832904060816574218753, 14712401204424400291787297607394206774218753, 5027982881016562571248237683551040219315980699574218753, 5488604004979149030407333271782173318791620565366546226763574218753
Offset: 1

Author

Steven Lu, Feb 19 2025

Keywords

Comments

This sequence is an example demonstrating how an integer sequence (thus a rational number sequence) converges to distinct limits in all p-adic systems; that is, converges to 1 in 2-adic, to 2 in 3-adic, to k in prime(k)-adic, and so on.
Moreover, the rational number sequence a(n) / prime(n+1) ^ (primorial(n)^(n-1) * A005867(n)) converges to distinct limits in all p-adic systems as well as the real number system, with limit zero in real numbers, and limit k in prime(k)-adic, where k is any positive integer.

Examples

			For n=3, a(3)=353 since 353 is the smallest nonnegative integer x satisfying:
  x == 1 (mod 2^3),
  x == 2 (mod 3^2),
  x == 3 (mod 5^1).
		

Crossrefs

Programs

  • Mathematica
    ToString[Table[ChineseRemainder[Range[n], (Prime /@ Range[n])^Range[n, 1, -1]], {n, 12}]]

A379881 Prime numbers of the form 8*x^2 + 27*y^2 where x and y are positive integers.

Original entry on oeis.org

59, 227, 251, 419, 443, 683, 827, 1187, 1451, 1523, 1811, 2027, 2243, 2339, 2579, 2699, 3299, 3371, 3467, 3539, 3659, 3779, 4211, 4259, 4523, 4547, 4691, 5387, 5531, 5651, 6131, 6203, 6299, 6323, 6947, 6971, 7043, 7187, 7451, 7499, 7643, 8123, 8219, 8363, 8387, 8867, 8963, 9011, 9371, 9491, 9539, 9851, 9923
Offset: 1

Author

Steven Lu, Feb 16 2025

Keywords

Comments

All terms are congruent to 11 modulo 24.

Examples

			59 = 8 * 2^2 + 27 * 1^2
227 = 8 * 5^2 + 27 * 1^2
251 = 8 * 1^2 + 27 * 3^2
		

Crossrefs

Intersection of A107161 and A002145.

Programs

  • Mathematica
    With[{limit = 10000}, Sort[DeleteDuplicates[Select[Flatten[Table[8 x^2 + 27 y^2, {x, Floor[Sqrt[limit/8]]}, {y, Floor[Sqrt[limit/27]]}]], PrimeQ[#] && # < limit &]]]]

A377476 Primes p such that 1..12 are quadratic residues modulo p.

Original entry on oeis.org

479, 1151, 1319, 1559, 2351, 2689, 2999, 3529, 3671, 3911, 4751, 4919, 5519, 5569, 5711, 6551, 6599, 7559, 7561, 7681, 8089, 8761, 8951, 9239, 9241, 9601, 9719, 9769, 10391, 10559, 10799, 12049, 12239, 12721, 12911, 13151, 13729, 14159, 14281, 14759, 14951, 15671, 15791, 16631, 16921
Offset: 1

Author

Steven Lu, Feb 16 2025

Keywords

Comments

An odd prime p is a term if and only if the Legendre symbol Legendre(q|p) = 1 for all q = 2,3,5,7,11; i.e., each prime q <= 12 is a quadratic residue.
Prime p is a term if and only if all the following conditions are satisfied:
p == +-1 (mod 24)
p == +-1 (mod 10)
p == +-1, +-3, +-9 (mod 28)
p == +-1, +-5, +-7, +-9, +-19 (mod 44)
Prime p is a term if and only if it is congruent to any number in the attached file modulo 9240.

Examples

			479 is a term of this sequence, since Legendre(b|479) = 1 for b = 1, 2, ..., 12.
		

Programs

  • Mathematica
    Select[Prime /@ Range[2000], And @@ Table[KroneckerSymbol[b, #] == 1, {b, Range[12]}] &]
  • PARI
    isok(p)={for(i=1, 12, if(kronecker(i,p)<0, return(0))); isprime(p)} \\ Andrew Howroyd, Feb 17 2025

A380784 Prime numbers p where the cyclotomic field Q(zeta_(p-1)) has class number one.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 61, 67, 71
Offset: 1

Author

Steven Lu, Feb 02 2025

Keywords

Comments

For a prime number p, the cyclotomic field of power p-1 can take a significant part in Z/pZ or p-adic field Q_p, since 1~p-1 are all (p-1)-th unit roots in Z/pZ. It would be much better if the cyclotomic integer ring is a unique factorization domain.
A prime number p is in this sequence if and only if (p-1)/2 is in A005848 (if p equals 3 modulus 4) or p-1 is in A005848 (otherwise).

Crossrefs

Cf. A005848.

A380832 Number of points in Z^4 of norm <= n where the sum of the four entries is even.

Original entry on oeis.org

1, 1, 49, 169, 625, 1465, 3337, 5689, 10009, 15937, 24865, 35761, 51265, 69817, 94849, 124009, 161497, 204529, 260137, 320497, 394705, 478705, 577489, 687913, 819313, 960457, 1127785, 1309153, 1517161, 1742497, 2001505, 2273473, 2585905, 2920009, 3297337, 3700153, 4144105, 4618657, 5145865, 5703073
Offset: 0

Author

Steven Lu, Feb 05 2025

Keywords

Comments

Points in Z^4 with even sum of entries forms the D_4 lattice. That is to say, the sequence is the "ball" pattern on D_4 lattice.
a(n) == 1 (mod 24).

Examples

			a(2) = 49, because in the ball with radius 2, there is 1 point (0,0,0,0), 8 points similar to (0,0,0,2), 24 points similar to (0,0,1,1), and 16 points similar to (1,1,1,1).
		

Crossrefs

Cf. A055410.

Programs

  • PARI
    a(n) = sum(x=-n, n, sum(y=-n, n, sum(z=-n, n, sum(t=-n, n, (((x+y+z+t) % 2)==0) && (x^2+y^2+z^2+t^2 <=n^2))))); \\ Michel Marcus, Feb 09 2025
  • Python
    # See Steven Lu's link
    

A380782 Class number of real quadratic field Q(sqrt(prime(n))).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 1, 5, 3, 1
Offset: 1

Author

Steven Lu, Feb 02 2025

Keywords

Comments

A278837 contains all primes p where the class number of Q(sqrt(p)) is larger than 1.

Examples

			For n = 22, a(22) = 3 since the class number of Q(sqrt(79)) is 3 where 79 is the 22nd prime.
		

Crossrefs

Programs

  • Mathematica
    Table[NumberFieldClassNumber[Sqrt[Prime[i]]], {i, 87}]