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 31-40 of 45 results. Next

A386303 Positive integers k such that the set {d+k/d : d|k} contains four consecutive integers.

Original entry on oeis.org

15120, 712800, 3341520, 10533600, 23284800, 85503600, 147026880, 171097920, 302702400, 477338400, 2058376320, 2633510880, 4204418400, 7342876800, 9673606800, 13035884400, 13734761040, 14895223200, 22388788800, 22647794400, 26108082000, 34183749600, 62246804400, 89169141600
Offset: 1

Views

Author

Giedrius Alkauskas, Jul 18 2025

Keywords

Comments

a(n) is divisible by 720.
Subsequence of A072389 (with two consecutive instead of four).
Integers k with five consecutive integers in the set {d+k/d : d|k} seem not to exist.
As terms must be of the form k * (k + 1) * m * (m + 1) and divisible by 720 we can restrict the search based on g = gcd(k * (k + 1), 720) which is at least 2. We must have (720 / g) | m * (m + 1). - David A. Corneth, Jul 19 2025
If q is the number of divisors of a(n) then the first of these four divisors is generally d[q/2 + 1] at least for nonsquares. For three consecutive integers (cf. A386302) there is the exception 180180. - David A. Corneth, Jul 20 2025

Examples

			a(1)=15120=M is a term of this sequence since 105, 108, 112, 120 are divisors of M, and 120+M/120=246, 112+M/112=247, 108+M/108=248, 105+M/105=249. It is the first term since no smaller such positive integer exists.
		

Crossrefs

Programs

  • Maple
    M:=2*10^10:
    Ki:={}:
    Vi:=floor(sqrt(2*M)):
    Ski:=floor((19*M)^(1/4)/2):
    for F from 1 to Vi-4 do
      for y from 1 to min(floor((Vi-F)/2),Ski) do
         G:=F+2*y+1:
         if issqr(2*F^2-G^2+2) and issqr(3*F^2-2*G^2+6) then
           x:=(F+G-1)/2:
           n:=x*(x+1)*y*(y+1):
           Ki:=Ki union {n}:
         end if:
      end do:
    end do:
    Ki;

Extensions

More terms from David A. Corneth, Jul 19 2025

A180507 Numbers k such that k^2 + 1 = p*q, p and q prime with p == q (mod k).

Original entry on oeis.org

3, 8, 12, 144, 1020, 8040, 13860, 34840, 729180, 1728240, 3232060, 17576520, 39279240, 85184880, 117649980, 778689840, 884737920, 1225045140, 1771563420, 3723878100, 3869896140, 4574299320, 7762395960, 12487172640, 14348911860, 14886940920, 21484957560, 24137574780
Offset: 1

Views

Author

Michel Lagneau, Jan 20 2011

Keywords

Comments

q - p = k with k = 3, 8, 144.
The next terms with q - p = k are F(432) = 85738...5984 and F(570) where F(n) is the n-th Fibonacci number. All such terms are in A001906; the next such term, if one exists, has more than 25000 decimal digits. - Charles R Greathouse IV, Jan 21 2011

Examples

			a(3) = 12 because 12^2 + 1 = 5*29 and 29 - 5 = 2*12;
a(8) = 34840 because 34840^2 + 1 = 4289 * 283009 and 283009 - 4289 = 278720 = 8*34840.
		

Crossrefs

Programs

  • Maple
    with(numtheory):for k from 1 to 40000 do: x:=k^2+1:y:=factorset(x):yy:=bigomega(x):if
      yy=2 and irem(y[2],k) =y[1] then printf(`%d, `,k):else fi:od:
  • PARI
    w(m, r) = Vec(x*(1-x)/(1-(m^2+2)*x+x^2) + O(x^r));
    isok(s, t) = isprime(s) && isprime(s+t);
    lista(nn) = {my(g, k, m=1, r, u=w(1, nn), v=List([])); for(i=2, r=#u, g=k=(u[i]+sqrtint(5*u[i]^2-4))/2; if(isok(u[i], k), listput(v, k))); while(r>2, u=w(m++, r); for(i=2, #u, k=(m*u[i]+sqrtint((m^2+4)*u[i]^2-4))/2; if(kJinyuan Wang, Mar 29 2020

Extensions

More terms from Charles R Greathouse IV, Jan 24 2011
Missing terms inserted and more terms from Jinyuan Wang, Mar 30 2020

A212353 a(n) is the smallest positive solutions of the congruence x^2 + (x+1)^2 == 0 (mod prime), where prime = A002144(n) (Pythagorean primes).

Original entry on oeis.org

1, 2, 6, 8, 15, 4, 11, 5, 13, 27, 37, 45, 16, 7, 18, 52, 64, 46, 9, 40, 91, 53, 44, 88, 120, 93, 108, 26, 77, 12, 101, 94, 106, 155, 134, 57, 31, 190, 71, 14, 89, 33, 54, 206, 150, 117, 244, 219, 241, 276, 38, 62, 17, 211, 243, 74, 277, 307, 325, 67, 306, 176, 43
Offset: 1

Views

Author

Wolfdieter Lang, May 10 2012

Keywords

Comments

The companion sequence is A212354.
There are at most two incongruent solutions of this congruence due to the degree. The fact that there are precisely two such solutions for each prime of the form 4*k+1 (see A002144) is due to the reduction of this problem to one of quadratic residues, namely to X^2 == -1 (mod 2p), with p a prime (see the Nagell reference, given in A210848, pp. 132-3, especially theorem 77), adapted to the quadratic form f(x) = 2*x^2 + 2*x + 1, with discriminant D=-4. This congruence with composite modulus has exactly two incongruent solutions because X^2 == -1 (mod 2) has only the solution +1 modulo 2 (odd numbers), and X^2 == -1 (mod p) has (at least one) solution if the Legendre symbol (-1/p) = +1 (i.e., if -1 is a quadratic residue modulo p). Now (-1/p) = (-1)^(p-1)/2 (see, e.g., the Niven-Zuckerman-Montgomery reference given in A001844, Theorem 3.2 (1), p. 132). Hence there is a solution modulo p iff p == 1 (mod 4). Call the smallest positive one X0, with 0 < X0 < p-1. Then one also has the incongruent solution X1 := p-X0. This implies that there are precisely two incongruent solution of the original congruence modulo 2*p for each 1 (mod 4) prime (see, e.g., Nagell's book, pp. 83-4, Theorem 46). If u is a solution for p = A002144(n) (the existence of u has just been proved) then also the companion v := p-1-u satisfies this congruence, and v is incongruent to u modulo p.
Note that x^2 + (x+1)^2 = 4*T(x) + 1, with the triangular numbers A000217.
The primes with x^2 +(x+1)^2 = prime (necessarily from A002144) are found under A027862. The corresponding x values are found under A027861. These x values explain the positions n' where a(n') is smaller than a(n'-1) (for n'>=6): determine k with x=A027861(k), and then n' from A027862(k) = A002144(n'). Note that a(n') = x for such values n'. E.g., n'=6 with a(6)=4: x=4=A027861(3), p=41=A027862(3) = A002144(6). These values n' are n' = 1, 2, 6, 8, 14, 19, 30, ...
All positive solutions of this congruence are provided by the two sequences with entries u(n,k) = a(n) + k*A002144(n) and v(n,k) = A212354(n) + k*A002144(n), n >= 1, k >= 0. For the cases p = 5, 13 and 17 see A047219, A212160 and A212161, respectively, where the even-indexed numbers are the u(n,k) and the odd-indexed ones the v(n,k) (bisection).
2*a(n) + 1 = A206549(n), the smallest positive nontrivial solution of X^2 == +1 (Modd A002144(n)). For the next larger solution 2*A212354(n) + 1 >= p, hence it does not belong to the restricted residue system Modd A002144(n).

Examples

			n=1: a(1)=1 because 1^2 + 2^2 = 5 == 0 (mod 5). The companion solution is (5-1) - 1 = 3 = A212354(1).
n=3: a(3)=6 because 6^2 + 7^2 = 85 = 5*17 == 0 (mod 17). The companion is (17-1) - 6 = 10 =  A212354(3).
n=14: a(14)=7 because p=A002144(14) = 113 = A027862(5), and 49^2 + 50^2 = 113. The companion is (113-1) - 7 = 105 = A212354(14).
		

Crossrefs

Cf. A047219(1)=a(1), A212160(1)=a(2), A212161(1)=a(3), A212354 (companions), A206549.

Formula

a(n) is the smaller of the two smallest positive incongruent solutions of the congruence x^2 + (x+1)^2 = 2*x^2 + 2*x + 1 == 0 (mod A002144(n)), where A002144 lists the primes
1 modulo 4 (primes of the form 4*k+1). For the proof of the existence of a(n) see a comment above. The next larger incongruent companion solution is A212354(n), n >= 1.

A212354 a(n) is the second smallest positive incongruent solutions of the congruence x^2 + (x+1)^2 == 0 (mod prime), where prime = A002144(n) (Pythagorean primes).

Original entry on oeis.org

3, 10, 10, 20, 21, 36, 41, 55, 59, 61, 59, 55, 92, 105, 118, 96, 92, 126, 171, 152, 105, 175, 188, 152, 136, 175, 168, 254, 215, 300, 215, 242, 242, 197, 238, 331, 365, 210, 337, 406, 343, 415, 402, 254, 358, 403, 296, 337, 327, 300, 554, 538, 595, 405
Offset: 1

Views

Author

Wolfdieter Lang, May 10 2012

Keywords

Comments

The companion sequence is A212353.
See the comments on A212353 for the proof of two incongruent solutions of this congruence for each prime A002144(n). One takes the smallest positive representatives in each case as A212353(n) and a(n), with A212353(n) < a(n).
All positive solutions of this congruence are provided by the two sequences with entries u(n,k) = A212353(n) + k*A002144(n) and v(n,k) = a(n) + k*A002144(n), n >= 1, k >= 0. For the cases p = 5, 13 and 17 see A047219, A212160 and A212161, respectively, where the even-indexed numbers are the u(n,k) and the odd-indexed ones the v(n,k) (bisection).
r2(n) := 2*a(n) + 1 >= A002144(n) iff r(n) := 2*A212353(n) + 1 <= A002144(n)- 2. r2(n)^2 == +1 (Modd A002144(n)) but only r(n) belongs to the relevant restricted residue class. See A206549. Note that floor(r2(n)^2/A002144(n)) is odd. The same holds for r2 replaced by r.

Examples

			n=1: a(1)=3 because 3^2 + 4^2 = 25 == 0 (mod 5). The other solution is (5-1) - 3 = 1 = A212353(1).
n=3: a(3)=10 because 10^2 + 11^2 = 221 = 13*17 == 0 (mod 17). (17-1) - 10 = 6 = A212353(3).
n=14: a(14)=105 because p=A002144(14) = 113 = A027862(5), and 105^2 + 106^2 = 197*113 == 0 (mod 113). (113-1) - 105 = 7 = A212353(14).
The first pair of solutions [u(n)=A212353(n), v(n)=a(n)], n >= 1, are [1, 3], [2, 10], [6, 10], [8, 20], [15, 21], [4, 36], [11, 41], [5, 55], [13, 59], [27, 61], ...
		

Crossrefs

Formula

a(n) is the second smallest positive incongruent solution of the congruence x^2 + (x+1)^2 = 2*x^2 + 2*x + 1 == 0 (mod A002144(n)), where A002144 lists the primes 1 modulo 4.
a(n) = A002144(n) - 1 - A212353(n), n >= 1.

A218214 Number of primes up to 10^n representable as sums of consecutive squares.

Original entry on oeis.org

1, 5, 18, 48, 117, 304, 823, 2224, 6113, 16974, 48614, 139349
Offset: 1

Views

Author

Martin Renner, Oct 23 2012

Keywords

Comments

There are no common representations of two, three or six squares for n < 13, so
a(n) = A218208(n) + A218210(n) + A218212(n); n < 13.

Examples

			a(1) = 1 because only one prime less than 10 can be represented as a sum of consecutive squares, namely 5 = 1^2 + 2^2.
a(2) = 5 because there are five primes less than 100 representable as a sum of consecutive squares: the aforementioned 5, as well as 13 = 2^2 + 3^2, 29 = 2^2 + 3^2 + 4^2, 41 = 4^2 + 5^2 and 61 = 5^2 + 6^2.
		

Crossrefs

Programs

  • Mathematica
    nn = 8; nMax = 10^nn; t = Table[0, {nn}]; Do[k = n; s = 0; While[s = s + k^2; s <= nMax, If[PrimeQ[s], t[[Ceiling[Log[10, s]]]]++]; k++], {n, Sqrt[nMax]}]; Accumulate[t] (* T. D. Noe, Oct 23 2012 *)

Formula

a(n) = sum(A218213(k),k=1..n)

A224870 Numbers m such that m^2 + (m+3)^2 is prime.

Original entry on oeis.org

1, 2, 5, 7, 10, 11, 16, 20, 22, 25, 37, 40, 41, 46, 50, 55, 61, 62, 65, 77, 85, 91, 92, 101, 106, 107, 116, 122, 125, 127, 130, 131, 142, 145, 146, 152, 155, 161, 172, 181, 182, 187, 196, 197, 206, 220, 221, 232, 235, 241, 242, 257, 260, 262, 265, 271, 275, 280, 281, 286, 295, 310, 317, 325, 326, 346, 356, 362, 380, 382, 386, 391
Offset: 1

Views

Author

Zak Seidov, Jul 22 2013

Keywords

Crossrefs

Programs

  • Maple
    A224870:=n->`if`(isprime(n^2 + (n+3)^2), n, NULL): seq(A224870(n), n=1..10^3); # Wesley Ivan Hurt, Feb 11 2017
  • Mathematica
    k = 3; Select[Range[500], PrimeQ[#^2 + (# + k)^2]&]
  • PARI
    isok(n) = isprime(n^2 + (n+3)^2); \\ Michel Marcus, Feb 13 2017

Formula

a(n) = (1/2)*(sqrt(2*A076727(n) - k^2) - k), k = 3.

A232768 Numbers n with the property that n^2+(n+1)^2 and n^2+(n+1)^2+(n+2)^2 are both prime.

Original entry on oeis.org

2, 12, 14, 24, 34, 122, 154, 164, 272, 342, 464, 612, 674, 734, 784, 794, 854, 1174, 1262, 1274, 1364, 1392, 1524, 1554, 1664, 1682, 1844, 1854, 1862, 1892, 1924, 1942, 1994, 2232, 2294, 2354, 2442, 2592, 2802, 2884, 3124, 3164, 3292, 3394, 3544, 3594, 3632, 3724, 3892, 3904, 3922
Offset: 1

Views

Author

Chris Fry, Nov 29 2013

Keywords

Comments

See A027862 for primes of the form x^2+(x+1)^2 = 2x^2+2x+1.
See A027864 for primes of the form x^2+(x+1)^2+(x+2)^2 = 3x^2+6x+5.
It is an open question whether either of these polynomials produces an infinite number of primes. This sequence lists the values of x that produce a prime in both polynomials. x must be congruent to 0 or 2 (mod 4) and all the generated primes are of the form 4k+1.

Examples

			When x=14, 2x^2+2x+1=421 and 3x^2+6x+5=677. 14 is the third value of x for which both these polynomials produce a prime number, so a(3)=14.
		

References

  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 2005, page 266.

Crossrefs

Cf. A027862, A027864. Equals n common to A027861 and A027863.

Programs

  • Mathematica
    lst = {}; Do[If[And[PrimeQ[n^2 + (n + 1)^2], PrimeQ[n^2 + (n + 1)^2 + (n + 2)^2]], Print[n]; AppendTo[lst, n]], {n, 10000}]
    Select[Range[2,4000,2],AllTrue[{(#^2+(#+1)^2),(#^2+(#+1)^2+(#+2)^2)},PrimeQ]&] (* Harvey P. Dale, Jul 30 2023 *)

A238222 Numbers m with property that m^2 + (m+1)^2 and (m+1)^2 + (m+2)^2 are prime.

Original entry on oeis.org

1, 4, 24, 29, 34, 69, 84, 99, 109, 224, 229, 259, 284, 289, 319, 389, 409, 474, 489, 494, 514, 589, 679, 694, 709, 749, 759, 844, 949, 1079, 1099, 1134, 1174, 1189, 1194, 1269, 1294, 1304, 1329, 1364, 1409, 1474, 1714, 1749, 1784, 1844, 1854, 1924, 2014, 2059, 2099, 2149
Offset: 1

Views

Author

Zak Seidov, Feb 21 2014

Keywords

Comments

Integers m such both m and m+1 are terms in A027861.
All corresponding primes are == 1 mod 4 (A002144 Pythagorean primes) and terms in A027862.
No such m such that also (m+2)^2 + (m+3)^2 is prime.

Examples

			1 is in the sequence because 1^2+2^2 = 5 and 2^2+3^2 = 13 are both prime.
4 is in the sequence because 4^2+5^2 = 41 and 5^2+6^2 = 61 are both prime.
		

Crossrefs

Cf. A002144, A062067, A027862. Subsequence of A027861.

Programs

  • Mathematica
    Reap[Do[If[PrimeQ[k^2+(k+1)^2]&&PrimeQ[(k+1)^2+(k+2)^2],Sow[k]],{k,2000}]][[2,1]]
    Select[Range[2500],AllTrue[{#^2+(#+1)^2,(#+1)^2+(#+2)^2},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Feb 25 2017 *)
  • PARI
    s=[]; for(m=1, 2500, if(isprime(m^2+(m+1)^2) && isprime((m+1)^2+(m+2)^2), s=concat(s, m))); s \\ Colin Barker, Feb 21 2014

A386302 Positive integers k such that the set {d+k/d : d|k} contains three consecutive integers.

Original entry on oeis.org

144, 180, 1260, 1440, 2520, 5040, 5544, 7200, 14040, 15120, 25200, 31680, 33660, 37800, 46800, 59400, 62244, 65520, 70560, 83160, 107100, 110880, 115920, 166320, 169344, 176400, 180180, 183600, 190944, 221760, 277200, 287280, 297540
Offset: 1

Views

Author

Giedrius Alkauskas, Jul 17 2025

Keywords

Comments

Terms are divisible by 36.
Subsequence of A072389 (with two consecutive rather than three).

Examples

			a(1)=144, since 144/12+12=24, 144/9+9=25, 144/8+8=26, and no smaller integer with such property exists.
		

Crossrefs

Programs

  • Maple
    M:=300000:
    Ki:={}:
    Vi:=floor(sqrt(2*M)):
    Ski:=floor((19*M)^(1/4)/2):
    for F from 1 to Vi-4 do
      for y from 1 to min(floor((Vi-F)/2),Ski) do
         G:=F+2*y+1:
         if issqr(2*F^2-G^2+2) then
           x:=(F+G-1)/2;
           n:=x*(x+1)*y*(y+1):
           Ki:=Ki union {n}:
         end if:
      end do:
    end do:
    Ki;
  • PARI
    isok(m, nb=3) = nb--; my(v = Set(apply(x->x+m/x, divisors(m)))); if (#v >= nb, select(x->(x==nb), vector(#v-nb, k, v[k+nb]-v[k]))); \\ Michel Marcus, Jul 18 2025

A180508 Numbers k such that k^2 + 1 = p*q, p and q primes and | p-q | <= k.

Original entry on oeis.org

3, 8, 46, 50, 76, 100, 144, 266, 274, 334, 504, 516, 526, 566, 670, 726, 756, 810, 836, 844, 1064, 1086, 1164, 1250, 1300, 1714, 1740, 1800, 1826, 1834, 1946, 1950, 2014, 2194, 2220, 2440, 2450, 2466, 2494, 2560, 2610
Offset: 1

Views

Author

Michel Lagneau, Jan 20 2011

Keywords

Comments

|p - q| = k for k = 3, 8, 144.

Examples

			46 is in the sequence because 46^2 + 1 = 29*73, and 73-29 = 44 < 46.
		

Crossrefs

Programs

  • Maple
    with(numtheory):for n from 1 to 4000 do: x:=n^2+1:y:=factorset(x):yy:=bigomega(x):if
      yy=2 and (y[2]-y[1] < n or y[2]-y[1] = n) then printf(`%d, `,n):else fi:od:
Previous Showing 31-40 of 45 results. Next