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 40 results.

A176796 Numbers k such that A129307(k) + A129307(k+1) is a square.

Original entry on oeis.org

1, 3, 12, 14, 17, 25, 30, 35, 39, 69, 71, 74, 80, 83, 88, 102, 107, 122, 126, 129, 134, 151, 170, 172, 176, 184, 187, 202, 220, 239, 244, 249, 258, 261, 263, 272, 280, 283, 289, 298, 308, 321, 363, 371, 377, 386, 390, 403, 421, 432, 438, 447, 451, 453, 477, 480
Offset: 1

Views

Author

Giovanni Teofilatto, Apr 26 2010

Keywords

Comments

Squares are in A075577.

Crossrefs

Programs

  • Maple
    A027861 := proc(n) option remember; local a; if n= 1 then 1; else for a from procname(n-1)+1 do if isprime(a^2+(a+1)^2) then return a; end if; end do: end if; end proc:
    A129307 := proc(n) A000217(A027861(n)) ; end proc:
    A176796 := proc(n) option remember; if n = 1 then 1; else for a from procname(n-1)+1 do if issqr(A129307(a)+A129307(a+1)) then return a; end if; end do: end if; end proc:
    seq(A176796(n),n=1..80) ; # R. J. Mathar, Jun 28 2010

Extensions

Extended beyond a(5) by R. J. Mathar, Jun 28 2010

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.

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

A251925 Prime powers p^k (k>=2) of the form (n^2+1)/2.

Original entry on oeis.org

25, 841, 28561, 32959081, 1119638521, 1985636569351347658201, 3051519929713402294221039791281, 4689566069222821420312720463003656425961, 183840368926047361112315395593676258316051401, 17020879736268069268391497343746883355223007561030622302744641179601
Offset: 1

Views

Author

Joerg Arndt, Dec 11 2014

Keywords

Comments

The corresponding n are a subsequence of A001333; see example.

Examples

			The first few terms correspond to
7^2 + 1 = 2 * 5^2 = 2 * 25,
41^2 + 1 = 2 * 29^2 = 2 * 841,
239^2 + 1 = 2 * 13^4 = 2 * 28561,
8119^2 + 1 = 2 * 5741^2 = 2 * 32959081,
47321^2 + 1 = 2 * 33461^2 = 2 * 1119638521,
63018038201^2+1 = 2 * 44560482149^2 = 2 * 1985636569351347658201.
		

Crossrefs

Cf. A027861 (primes of the form (n^2+1)/2), A001333, A008844 (primes and composites with k=2).

Programs

  • Mathematica
    With[{r=Range[100]},Select[((ChebyshevT[r,I]/I^r)^2+1)/2,!PrimeQ[#]&&PrimePowerQ[#]&]] (* Paolo Xausa, Nov 13 2023, after Joerg Arndt *)
  • PARI
    forstep(n=1,10^9,2, t=(n^2+1)/2; if( !isprime(t) && isprimepower(t), print1(t,", ")));
    
  • PARI
    /* much more efficient: */
    {b(n) = polchebyshev(n, 1, I) / I^n}
    for(n=1,10^3,t=(b(n)^2+1)/2;if(!isprime(t)&&isprimepower(t),print1(t,", ")));

A309388 Numbers y such that x*(x+1) + y*(y+1) = z*(z+1) does not have a solution in positive integers x, z with x <= y.

Original entry on oeis.org

1, 3, 4, 7, 8, 11, 12, 15, 16, 19, 23, 28, 31, 32, 36, 40, 43, 47, 52, 59, 60, 63, 64, 67, 71, 72, 79, 83, 87, 88, 96, 100, 103, 107, 108, 112, 127, 128, 131, 136, 139, 148, 151, 156, 163, 167, 172, 176, 179, 180, 183, 187, 191, 192, 196, 199, 211, 223, 227
Offset: 1

Views

Author

Ralf Steiner, Aug 02 2019

Keywords

Comments

The similar sequence A027861 (complement of A012132) is related to primes.

Crossrefs

Complement of A308395.

Programs

  • Maple
    filter:= proc(y) local S;
      S:= map(t -> subs(t, x), [isolve(x*(x+1)+y*(y+1)=z*(z+1))]);
      select(t -> t>0 and t<=y, S) = []
    end proc:
    select(filter, [$1..300]); # Robert Israel, Aug 06 2019
  • Mathematica
    max = 500; lst = {}; For[x = 1, x < max, x++,
    For[y = x, y < max, y++,
      For[z = y, z < max, z++,
       If[x (x + 1) + y (y + 1) == z (z + 1),
        lst = AppendTo[lst, y]]]]]; lst =
    Select[Union[lst], # < max/2 &]; Complement[Range[Length[lst]], lst]
  • Python
    from sympy import integer_nthroot
    A309388_list, y, w = [], 1, 0
    while len(A309388_list) < 10000:
        w += y
        z = 0
        for x in range(1,y+1):
            z += x
            if integer_nthroot(8*(w+z)+1,2)[1]:
                break
        else:
            A309388_list.append(y)
        y += 1 # Chai Wah Wu, Aug 07 2019

A108770 Numbers n such that n^2 + (n+1)^2 is a brilliant number.

Original entry on oeis.org

3, 10, 15, 20, 27, 37, 59, 92, 105, 120, 152, 155, 175, 190, 215, 219, 242, 245, 254, 255, 277, 300, 302, 307, 325, 337, 362, 365, 370, 402, 415, 614, 930, 944, 987, 1049, 1059, 1112, 1192, 1204, 1210, 1220, 1265, 1312, 1344, 1360, 1374, 1449, 1460, 1504, 1527
Offset: 1

Views

Author

Jason Earls, Jun 25 2005

Keywords

Comments

Consecutive terms are (254,255) (4099,4100) (11159,11160) (25094,25095) (31754,31755) (40189,40190) ... Conjecture: There are infinitely many consecutive values.

Examples

			92 is a term because 92^2 + 93^2 = 17113 = 109*157 and both of its
factors have three digits.
		

Crossrefs

A334294 Numbers k such that 70*k^2 + 70*k - 1 is prime.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 17, 20, 22, 23, 24, 26, 27, 29, 30, 31, 33, 34, 36, 37, 39, 40, 41, 43, 44, 45, 46, 56, 57, 58, 59, 60, 61, 63, 64, 65, 66, 67, 68, 70, 71, 74, 76, 77, 78, 79, 80, 81, 82, 87, 88, 90, 93, 96, 97, 100
Offset: 1

Views

Author

James R. Buddenhagen, Apr 21 2020

Keywords

Comments

Among quadratic polynomials in k of the form a*k^2 + a*k - 1 the value a=70 gives the most primes for any a in the range 1<=a<=300, at least up to k=40000. Here a and k are positive integers. Other "good" values of a are a=250, a=99, and a=19.

Examples

			For k=1, 70*k^2 + 70*k - 1 = 70*1^2 + 70*1 - 1 = 139, which is prime, so 1 is in the sequence.
		

Crossrefs

Programs

  • Maple
    a:=proc(n) if isprime(70*n^2+70*n-1) then n else NULL end if end proc;
    seq(a(n),n=1..100);
  • Mathematica
    Select[Range@ 100, PrimeQ[70 #^2 + 70 # - 1] &] (* Michael De Vlieger, May 26 2020 *)
Previous Showing 31-40 of 40 results.