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 21-30 of 32 results. Next

A308344 a(n) = (A001359(n+1)^2 - 1)/24, where A001359 = lesser of twin primes; or: pentagonal numbers (A000326) whose indices are twin ranks (A002822).

Original entry on oeis.org

1, 5, 12, 35, 70, 145, 210, 425, 477, 782, 925, 1335, 1520, 1617, 2147, 2380, 3015, 3290, 4030, 5017, 7315, 7740, 8855, 11310, 13490, 14950, 15862, 17120, 18095, 27270, 28085, 28497, 30602, 32340, 43265, 44290, 45850, 46905, 49595, 55200, 62935, 67947, 69230, 70525
Offset: 1

Views

Author

M. F. Hasler and A. Dinculescu, Jul 04 2019

Keywords

Comments

Subsequence of A024702 which considers all primes rather than only twins.
This sequence seems to play an important role in studying the twin prime conjecture; see also A057767, A273257, and related.
Dinculescu calls the numbers M(j) = (prime(j)^2 - 1)/6 "basic numbers", and [M(j), M(j+1)] a "twin interval" when j is the index of a twin prime. He notes that the length of such an interval equals four times the corresponding twin rank k(j) = (prime(j) + prime(j+1))/6, see near eq.(3.3) in the 2018 paper.

Examples

			Sequence A001359 = {3, 5, 11, 17, 29, ...} lists the lesser members of pairs of twin primes, (3, 5), (5, 7), (11, 13), (17, 19), ...
We ignore the first and start with the second pair, (5, 7). We have (5^2 - 1)/24 = 1 = a(1).
Next comes the pair (11, 13), whence (11^2 - 1)/24 = 120/24 = 5 = a(2), etc.
		

Crossrefs

Programs

  • Mathematica
    (#^2-1)/24&/@Rest[Select[Partition[Prime[Range[300]],2,1],#[[2]]-#[[1]] == 2&][[All,1]]] (* Harvey P. Dale, Sep 05 2020 *)
  • PARI
    a(n)=A000326(A002822(n))
    
  • PARI
    a(n)=(A001359(n+1)^2-1)/24 \\ or implemented as follows:
    p=0;forprime(q=5,oo,p+2==q&&print1(p^2\24",");p=q)

Formula

a(n) = (A001359(n+1)^2 - 1)/24 = A000326(A002822(n)).

A323015 a(n) is the number of unordered partitions of 24*n + 4 into four squares of primes (A001248).

Original entry on oeis.org

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

Views

Author

Jianing Song, Jan 05 2019

Keywords

Comments

Also, a(n) is the number of unordered partitions of n into four terms of A024702.
a(n) > 0 for 4 <= n <= 2*10^4. Conjecture: a(n) > 0 for all n >= 4. A stronger conjecture: lim inf a(n) = +oo.
This is a quadratic analog of Goldbach's conjecture, asking for the smallest k such that any sufficiently large number congruent to k modulo 24 can be written as the sum of k squares of primes. k = 1 is trivially false. Let n = 49*t + 2 (t > 0), then 24*n + 2 = 24*49*t + 98, which is a multiple of 7^2. If p^2 + q^2 = 24*n + 2, since the squares of primes other than 7 are congruent to 1, 2, 4 modulo 7, we must have p = q = 7, but p^2 + q^2 < n. So k = 2 is false. Let n = 245*t + 103, then 24*n + 3 = 24*245*t + 2475, which is a multiple of 5. If p^2 + q^2 + r^2 = 24*n + 3, since the squares of primes other than 5 are congruent to 1, 4 modulo 5, we must have that at least one of p, q, r is 5. Suppose that p = 5, then q^2 + r^2 = 24*245*t + 2450, which is a multiple of 7^2. As is shown above, q = r = 7, but p^2 + q^2 + r^2 < n. So k = 3 is also false. On the other hand, if the case k = 4 is true, then all the cases k >= 4 are trivially true, because we can add as many 5^2 as needed. So the case k = 4 is the most interesting.

Examples

			100 = 5^2 + 5^2 + 5^2 + 5^2.
124 = 5^2 + 5^2 + 5^2 + 7^2.
148 = 5^2 + 5^2 + 7^2 + 7^2.
172 = 5^2 + 7^2 + 7^2 + 7^2.
196 = 7^2 + 7^2 + 7^2 + 7^2 = 5^2 + 5^2 + 5^2 + 11^2.
220 = 5^2 + 5^2 + 7^2 + 11^2.
244 = 5^2 + 7^2 + 7^2 + 11^2 = 5^2 + 5^2 + 5^2 + 13^2.
268 = 7^2 + 7^2 + 7^2 + 11^2 = 5^2 + 5^2 + 7^2 + 13^2.
...
		

Crossrefs

See A323016 for the ordered version.

Programs

  • Maple
    h:= proc(n) option remember; `if`(n<1, 0, (t->
          `if`((ithprime(t+2)^2-1)/24>n, t-1, t))(1+h(n-1)))
        end:
    b:= proc(n, i, c) option remember; `if`(n=0, `if`(c=0, 1, 0),
          `if`(min(i, c)<1, 0, b(n, i-1, c)+(t-> b(n-t, min(i,
             h(n-t)), c-1))((ithprime(i+2)^2-1)/24)))
        end:
    a:= n-> b(n, h(n), 4):
    seq(a(n), n=0..120);  # Alois P. Heinz, Jan 05 2019
  • Mathematica
    h[n_] := h[n] = If[n < 1, 0, Function[t, If[(Prime[t + 2]^2 - 1)/24 > n, t - 1, t]][1 + h[n - 1]]];
    b[n_, i_, c_] := b[n, i, c] = If[n == 0, If[c == 0, 1, 0], If[Min[i, c] < 1, 0, b[n, i - 1, c] + Function[t, b[n - t, Min[i, h[n - t]], c - 1]][(Prime[i + 2]^2 - 1)/24]]];
    a[n_] := b[n, h[n], 4];
    a /@ Range[0, 120] (* Jean-François Alcover, Nov 22 2020, after Alois P. Heinz *)
  • PARI
    a(n) = if(n<4, 0, my(i=0, k=sqrt(24*n-71)); forprime(p=5, k, forprime(q=p, k, forprime(r=q, k, forprime(s=r, k, if(p^2+q^2+r^2+s^2==24*n+4, i++))))); i)

A364868 Numbers k such that 4*k+1 is the norm of a Gaussian prime.

Original entry on oeis.org

1, 2, 3, 4, 7, 9, 10, 12, 13, 15, 18, 22, 24, 25, 27, 28, 30, 34, 37, 39, 43, 45, 48, 49, 57, 58, 60, 64, 67, 69, 70, 73, 78, 79, 84, 87, 88, 90, 93, 97, 99, 100, 102, 105, 108, 112, 114, 115, 127, 130, 132, 135, 139, 142, 144, 148, 150, 153, 154, 160, 163, 165, 168, 169
Offset: 1

Views

Author

Jianing Song, Aug 11 2023

Keywords

Comments

Numbers k such that 4*k+1 is a prime or the square of a prime congruent to 3 modulo 4.
If p is a Gaussian prime of norm 4*a(n)+1 (there are two up to association if a(n) is a prime, one if a(n) is the square of a prime), then for any Gaussian integer x, we have x^a(n) == 0, 1, i, -1 or -i (mod p) where i is a primitive fourth root of unity.

Examples

			2 is a term since 4*2+1 is the norm of the Gaussian prime 3.
		

Crossrefs

Contains 6*A024702 as a subsequence.

Programs

Formula

a(n) = (A055025(n+1) - 1)/4.

A364869 Numbers k such that 6*k+1 is the norm of an Eisenstein prime.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13, 16, 17, 18, 20, 21, 23, 25, 26, 27, 30, 32, 33, 35, 37, 38, 40, 45, 46, 47, 48, 51, 52, 55, 56, 58, 61, 62, 63, 66, 68, 70, 72, 73, 76, 77, 81, 83, 87, 88, 90, 91, 95, 96, 100, 101, 102, 103, 105, 107, 110, 112, 115, 118, 121, 122, 123
Offset: 1

Views

Author

Jianing Song, Aug 11 2023

Keywords

Comments

Numbers k such that 6*k+1 is a prime or the square of a prime congruent to 5 modulo 6.
If p is an Eisenstein prime of norm 6*a(n)+1 (there are two up to association if a(n) is a prime, one if a(n) is the square of a prime), then for any Eisenstein integer x, we have x^a(n) == 0, 1, w, w^2, -1, -w or -w^2 (mod p), where w = (1+sqrt(-3))/2 is a primitive sixth root of unity.

Examples

			4 is a term since 6*4+1 is the norm of the Eisenstein prime 5.
		

Crossrefs

Contains 4*A024702 as a subsequence.

Programs

Formula

a(n) = (A055664(n+2) - 1)/6.

A226133 Integers of the form (p*q-1)/24 where p < q are primes.

Original entry on oeis.org

6, 9, 11, 20, 21, 23, 27, 29, 30, 31, 33, 34, 36, 37, 38, 41, 44, 45, 49, 53, 56, 58, 59, 60, 61, 63, 64, 65, 66, 68, 79, 80, 81, 82, 85, 94, 96, 97, 98, 102, 104, 106, 107, 110, 115, 116, 120, 122, 124, 128, 129
Offset: 1

Views

Author

Richard R. Forberg, May 27 2013

Keywords

Comments

Results for p = q are given in A024702, which is complementary.
All integer results when viewed in the triangle occur in loosely diagonal, interrupted "bands" roughly (or exactly) parallel to main diagonal, such that q - p = 24m, where m = 1 for the first band closest to the main diagonal, m = 2 for the second band, m = 3 for the third band, etc. The main diagonal p = q can be considered as fitting in this pattern where m = 0.
A general "rule" can be stated: If q-p = 24m for any m >= 0 and primes p < q, then p*q-1 is divisible by 24. This follows algebraically from the known "rule" that p^2 - 1 is divisible by 24 for any prime p > 3 as given in A024702.
No result will occur twice, even when including A024702, because the product of any two primes is unique within the set.
Integer results have a density of about 12% to 13% for all possible p,q pairs among the first few hundred primes.

Examples

			(5*29-1)/24 = 6, (7*31-1)/24 = 9, (5*53-1)/24 = 11; also note about these three examples, in order, that 29-5 = 24, 31-7 = 24 and 53-5 = 48.
		

Crossrefs

Complementary to A024702.

Programs

Extensions

Missing a(8) from Charles R Greathouse IV, May 31 2013

A276809 Least prime p such that (p^2-1)/24 is divisible by prime(n) or 0 if no such prime exists.

Original entry on oeis.org

7, 17, 11, 13, 23, 53, 67, 37, 47, 59, 61, 73, 83, 173, 281, 107, 353, 367, 269, 283, 293, 157, 167, 179, 193, 607, 617, 641, 653, 227, 509, 263, 547, 277, 1193, 907, 313, 653, 1669, 347, 359, 1087, 383, 773, 787, 397, 421, 1783, 907, 457, 467, 479, 1447, 503, 1543
Offset: 1

Views

Author

Michel Marcus, Sep 18 2016

Keywords

Comments

Sequence motivated by a comment in A024702: "The set of prime factors of a(n), however, appears to include all primes".

Examples

			a(1) = 7 because 7 is the least prime p such that (p^2-1)/24, which is 2, is divisible by 2=prime(1).
a(2) = 17 because 17 is the least prime p such that (p^2-1)/24, which is 12, is divisible by 3=prime(2).
a(3) = 11 because 11 is the least prime p such that (p^2-1)/24, which is 5, is divisible by 5=prime(3).
		

Crossrefs

Cf. A024702.

Programs

  • PARI
    a(n) = {p = prime(n); q = prime(3); while (! vecsearch(factor((q^2 - 1)/24)[,1], p), q = nextprime(q+1)); q;}

A282445 For n>=5, a(n) is the smallest m>=3 such that odd part of ((prime(n)^2 - prime(m)^2)/3) is prime, or a(n)=0 if there is no such m

Original entry on oeis.org

4, 3, 3, 3, 4, 3, 4, 3, 4, 3, 7, 3, 12, 6, 8, 4, 13, 7, 8, 4, 11, 3, 20, 5, 6, 22, 11, 23, 13, 16, 14, 9, 10, 10, 24, 29, 6, 40, 31, 0, 3, 4, 40, 11, 32, 45, 13, 7, 30, 3, 53, 20, 6, 30, 35, 27, 54, 26, 0, 63, 46, 57, 16, 67, 67, 38, 0, 39, 52, 5, 61, 75, 3
Offset: 5

Views

Author

Vladimir Shevelev, Feb 15 2017

Keywords

Comments

a(n) = 0 for n: 44, 63, 71, 80, 89, 95, 97, 108, 118, 122, 132, 141, 150, etc. Robert G. Wilson v, Feb 15 2017

Examples

			Let n=9, prime(9)=23. If m=3, then odd part of (23^2 - 5^2)/24 is 21, while if m=4, then odd part of (23^2 - 7^2)/24 is 5 which is prime. So a(9)=4.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{m = 3, p = Prime[n]^2}, While[q = (p - Prime[m]^2)/3; m < n && ! PrimeQ[q/2^IntegerExponent[q, 2]], m++]; If[m < n, m, 0]]; Array[f, 73, 5] (* Robert G. Wilson v, Feb 15 2017 *)

Extensions

More terms from Peter J. C. Moses, Feb 15 2017

A323016 a(n) is the number of ordered partitions of 24*n + 4 into four squares of primes (A001248).

Original entry on oeis.org

0, 0, 0, 0, 1, 4, 6, 4, 5, 12, 16, 16, 18, 16, 18, 28, 34, 28, 26, 36, 49, 40, 44, 52, 42, 52, 70, 52, 47, 60, 76, 72, 54, 76, 60, 48, 88, 68, 50, 72, 78, 80, 48, 96, 102, 60, 98, 76, 79, 96, 104, 112, 52, 108, 132, 64, 112, 88, 94, 120, 89, 136, 72, 88, 168, 96
Offset: 0

Views

Author

Jianing Song, Jan 05 2019

Keywords

Comments

The main entry is A323015, which is the unordered version.
Also, a(n) is the number of ordered partitions of n into four terms of A024702.
a(n) > 0 for 4 <= n <= 2*10^4. Conjecture: a(n) > 0 for all n >= 4. A stronger conjecture: lim inf a(n) = +oo.

Examples

			100 = 5^2 + 5^2 + 5^2 + 5^2 (1 permutation).
124 = 5^2 + 5^2 + 5^2 + 7^2 (4 permutations).
148 = 5^2 + 5^2 + 7^2 + 7^2 (6 permutations).
172 = 5^2 + 7^2 + 7^2 + 7^2 (4 permutations).
196 = 7^2 + 7^2 + 7^2 + 7^2 (1 permutation) = 5^2 + 5^2 + 5^2 + 11^2 (4 permutations).
220 = 5^2 + 5^2 + 7^2 + 11^2 (12 permutations).
244 = 5^2 + 7^2 + 7^2 + 11^2 (12 permutations) = 5^2 + 5^2 + 5^2 + 13^2 (4 permutations).
268 = 7^2 + 7^2 + 7^2 + 11^2 (4 permutations) = 5^2 + 5^2 + 7^2 + 13^2 (12 permutations).
...
		

Crossrefs

Programs

  • PARI
    a(n) = if(n<4, 0, polcoeff(sum(p=5, sqrt(24*n-48), if(isprime(p), x^((p^2-1)/24), 0))^4, n))

Formula

G.f.: (Sum_{primes p>=5} x^((p^2-1)/24))^4 = (Sum_{k>=3} x^A024702(k))^4.

A055078 Write n as a sum of terms of the form (p^2-1)/24 where p is a prime > 4; sequence gives those n which require at least 4 terms.

Original entry on oeis.org

33, 68, 88, 103, 138, 143, 173, 183, 198, 208, 243, 253, 278, 298, 308, 313, 348, 363, 373, 383, 403, 413, 418, 453, 468, 473, 488, 523, 528, 558, 563, 578, 583, 593, 608, 628, 638, 643, 658, 663, 668, 693, 698, 733, 748, 753, 758, 763, 768, 778, 803, 838
Offset: 1

Views

Author

Jud McCranie, Jun 20 2000

Keywords

Comments

Chowla conjectures that all numbers are the sum of no more than four terms of the form (p^2-1)/24 where p is a prime > 4.

References

  • R. K. Guy, Unsolved Problems In Number Theory, section C20.

Crossrefs

Cf. A024702.

A227698 a(n) is the number of ways to form the integer n as (p^2 + q^2 - 2)/24, where p and q are primes > 3 (excluding swaps of p and q).

Original entry on oeis.org

0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 2, 0, 1, 2, 0, 1, 1, 0, 1, 1, 2, 0, 0, 2, 0, 1, 1, 0, 0, 0, 1, 0, 1, 2, 0, 0, 1, 1, 2, 0, 1, 1, 0, 2, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 2, 0, 1, 0, 0, 0, 0, 1, 1, 1, 2
Offset: 1

Views

Author

Richard R. Forberg, Sep 22 2013

Keywords

Comments

Define "density" of a(n) as D(n) = sum(i=1 to n, a(n))/n. Define "average size of a hit" as H(n) = sum(i=1 to n, a(n))/sum(i=1 to n, b(n)) where b(n) = 0 if a(n) = 0, and b(n) = 1 if a(n) > 0. While D(n) declines from a maximum of around 88% at n = 17, to 46.6% at n= 1742, and down to 27.8% at n =~ 40000. Whereas H(n) increases from 1.0 to a maximum of 1.3904 at n = 1742 and then declines slowly to about 1.356 at n =~40000. This shows a strong increase in the "clustering tendency" of these sums onto particular values of n up through n = 1741, and strong persistence of that tendency even as the density declines significantly at large n.
The "hit density" of a(n), defined as sum(i=1 to n, b(n))/n, reaches its maximum of 80% at n = 10 and declines to 20.51% at n = 40,000 as it continues to fall almost steadily in that range and likely to continue.
a(n) reaches values of 8 at n = 3407, 15392, 18282, 32817, 37337 (for n<=40000), which is the highest value of a(n) in this range.
A persistent tendency for more frequent large values of a(n) for n> 40000 is conjectured, with the likelihood that 8 is NOT the maximum value, and the possibility that ever larger values can always be found at higher n.

Crossrefs

Previous Showing 21-30 of 32 results. Next