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 46 results. Next

A302442 Number of primes of the form b^2-2 for b <= 10^n.

Original entry on oeis.org

5, 26, 157, 1153, 8888, 72928, 615643, 5328644, 47034083, 420950239
Offset: 1

Views

Author

Seiichi Manyama, Apr 08 2018

Keywords

Comments

From Jacques Tramu, Sep 13 2018: (Start)
Table C(i) = a(i)/pi(10^i) = a(i)/A000720(10^i)
a(1) = 5 C(1) = 1.25000000
a(2) = 26 C(2) = 1.04000000
a(3) = 157 C(3) = 0.93452381
a(4) = 1153 C(4) = 0.93816111
a(5) = 8888 C(5) = 0.92660550
a(6) = 72928 C(6) = 0.92904278
a(7) = 615643 C(7) = 0.92636541
a(8) = 5328644 C(8) = 0.92487818
a(9) = 47034083 C(9) = 0.92500224
a(10) = 420950239 C(10) = 0.92505860
(End)

Examples

			a(1) = 5 because there are 5 primes of the form b^2-2 for b <= 10 : 2, 7, 23, 47 and 79.
		

Crossrefs

Number of primes of the form b^2+m for b <= 10^n: A302443 (m=-3), this sequence (m=-2), A206709 (m=1), A302434 (m=2), A302435 (m=3).
Cf. A028871.

Programs

  • PARI
    {a(n) = sum(k=0, 10^n, isprime(k^2-2))}
    
  • Python
    from sympy import isprime
    def aupton(terms):
      s, alst = 0, []
      for n in range(1, terms+1):
        s += sum(isprime(b**2-2) for b in range(10**(n-1), 10**n))
        alst.append(s)
      return alst
    print(aupton(6)) # Michael S. Branicky, May 26 2021

Extensions

a(10) from Jacques Tramu, Sep 14 2018

A309998 Nonnegative values x of solutions (x, y) to the Diophantine equation x^2 + (x + 529)^2 = y^2.

Original entry on oeis.org

0, 276, 287, 740, 759, 1587, 3059, 3120, 5687, 5796, 10580, 19136, 19491, 34440, 35075, 62951, 112815, 114884, 202011, 205712, 368184, 658812, 670871, 1178684, 1200255, 2147211, 3841115, 3911400, 6871151, 6996876, 12516140, 22388936, 22798587, 40049280, 40782059, 72950687
Offset: 1

Views

Author

Mohamed Bouhamida, Aug 26 2019

Keywords

Comments

For the generic case x^2 + (x + p^2)^2 = y^2 with p = m^2 - 2 a prime number in A028871, m>=5, (0; p^2) and (2*m^3 + 2*m^2 - 4*m - 4; m^4 + 2*m^3 - 4*m - 4) are solutions.

Crossrefs

Cf. A207059.

Programs

  • Mathematica
    Rest@ CoefficientList[Series[x^2*(276 + 11 x + 453 x^2 + 19 x^3 + 828 x^4 - 184 x^5 - 5 x^6 - 151 x^7 - 5 x^8 - 184 x^9)/((1 - x) (1 - 6 x^5 + x^10)), {x, 0, 36}], x] (* Michael De Vlieger, Sep 29 2019 *)
  • PARI
    concat(0, Vec(x^2*(276 + 11*x + 453*x^2 + 19*x^3 + 828*x^4 - 184*x^5 - 5*x^6 - 151*x^7 - 5*x^8 - 184*x^9) / ((1 - x)*(1 - 6*x^5 + x^10)) + O(x^40))) \\ Colin Barker, Aug 27 2019

Formula

a(n) = 6*a(n-5) - a(n-10) + 1058 with a(0) = 0, a(1) = 276, a(2) = 287, a(3) = 740, a(4) = 759, a(5) = 1587, a(6) = 3059, a(7) = 3120, a(8) = 5687, a(9) = 5796.
From Colin Barker, Aug 27 2019: (Start)
G.f.: x^2*(276 + 11*x + 453*x^2 + 19*x^3 + 828*x^4 - 184*x^5 - 5*x^6 - 151*x^7 - 5*x^8 - 184*x^9) / ((1 - x)*(1 - 6*x^5 + x^10)).
a(n) = a(n-1) + 6*a(n-5) - 6*a(n-6) - a(n-10) + a(n-11) for n>11.
(End)

A063531 Numbers k such that sigma(k) + 1 is a square.

Original entry on oeis.org

2, 7, 8, 14, 15, 23, 32, 33, 35, 47, 54, 56, 57, 60, 72, 78, 79, 84, 87, 92, 95, 120, 123, 124, 128, 138, 143, 154, 165, 167, 174, 184, 190, 196, 213, 223, 235, 242, 252, 253, 258, 267, 295, 312, 315, 319, 323, 327, 348, 359, 375, 378, 380, 393, 412, 423, 439
Offset: 1

Views

Author

Labos Elemer, Aug 02 2001

Keywords

Comments

Numbers k such that A000203(k) = -1 + m^2 for some m.

Examples

			If k = p(p+2) is a product of twin primes (from A037074), then sigma(k) + 1 = 1 + (p+1)(p+3) = (p+2)^2, square of the larger twin. Other solutions can be either special primes = m^2 - 2 or composites like 120: sigma(120) = 120 + 60 + ... + 1 = 360 = 19^2 - 1. Square number solution is, e.g., 196: sigma(196) = 399 = 20^2 - 1.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[500],IntegerQ[Sqrt[DivisorSigma[1,#]+1]]&] (* Harvey P. Dale, Jul 02 2021 *)
  • PARI
    { n=0; for (a=1, 10^9, if (issquare(sigma(a) + 1), write("b063531.txt", n++, " ", a); if (n==1000, break)) ) } \\ Harry J. Smith, Aug 25 2009

Extensions

Minor edits from Franklin T. Adams-Watters, Aug 29 2009

A146329 Numbers k such that continued fraction of (1 + sqrt(k))/2 has period 4.

Original entry on oeis.org

6, 7, 8, 14, 20, 23, 24, 28, 32, 33, 34, 42, 47, 48, 52, 55, 60, 62, 69, 72, 75, 78, 79, 80, 95, 98, 110, 119, 120, 126, 133, 135, 136, 138, 140, 141, 142, 156, 167, 168, 174, 180, 189, 194, 205, 210, 213, 215, 219, 220, 222, 223, 224, 248, 252, 254, 272, 287, 288
Offset: 1

Views

Author

Artur Jasinski, Oct 30 2008

Keywords

Comments

For primes in this sequence see A028871 - {2}.

Examples

			a(2) = 7 because continued fraction of (1 + sqrt(7))/2 = 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, ... has period (1,1,4,1) length 4.
		

Crossrefs

Programs

  • Maple
    isA146329 := proc(n) RETURN(A146326(n) = 4) ; end:
    for n from 2 to 400 do if isA146329(n) then printf("%d,",n) ; fi; od: # R. J. Mathar, Sep 06 2009
  • Mathematica
    cf4Q[n_]:=Module[{s=(1+Sqrt[n])/2},If[IntegerQ[s],1,Length[ ContinuedFraction[ s][[2]]]]==4]; Select[Range[300],cf4Q] (* Harvey P. Dale, Dec 14 2017 *)

Extensions

39, 68, 150, 155, etc. removed by R. J. Mathar, Sep 06 2009

A259764 Least prime p such that prime(p*n)-1 is a square, or 0 if no such p exists.

Original entry on oeis.org

3, 13, 41, 3, 11, 2, 241, 181, 5, 2927, 5, 523, 2, 4967, 3, 421, 33053, 8447, 17107, 20747, 1811, 5743, 20407, 99643, 165443, 769, 21269, 46099, 3121, 9883, 16301, 523, 10771, 41603, 17, 7, 48383, 455353, 711317, 1637, 3, 105397, 43, 12071, 186113, 56437, 303157, 211, 25951, 178817
Offset: 1

Views

Author

Zhi-Wei Sun, Jul 04 2015

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0.
This is stronger than the conjecture in A259731. It implies the well-known conjecture that there are infinitely many primes of the form x^2-1 with x an integer.
I also conjecture that for any positive integer n there exists a prime p such that prime(p*n)+2 is a square.

Examples

			a(1) = 3 since 3 is prime and prime(3*1)-1 = 2^2 is a square.
a(2) = 13 since 13 is prime and prime(13*2)-1 = 10^2 is a square.
		

References

  • Zhi-Wei Sun, Problems on combinatorial properties of primes, in: M. Kaneko, S. Kanemitsu and J. Liu (eds.), Number Theory: Plowing and Starring through High Wave Forms, Proc. 7th China-Japan Seminar (Fukuoka, Oct. 28 - Nov. 1, 2013), Ser. Number Theory Appl., Vol. 11, World Sci., Singapore, 2015, pp. 169-187.

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
    Do[k=0;Label[bb];k=k+1;If[SQ[Prime[Prime[k]*n]-1],Goto[aa],Goto[bb]];Label[aa];Print[n," ",Prime[k]];Continue,{n,1,50}]

A332000 Nonnegative values x of solutions (x, y) to the Diophantine equation x^2 + (x + 47^2)^2 = y^2.

Original entry on oeis.org

0, 752, 1820, 2231, 3995, 6627, 10575, 16511, 18840, 28952, 44180, 67116, 101664, 115227, 174135, 262871, 396539, 597891, 676940, 1020276, 1537464, 2316536, 3490100, 3950831, 5951939, 8966331, 13507095, 20347127, 23032464, 34695776, 52264940, 78730452, 118597080, 134248371
Offset: 1

Views

Author

Mohamed Bouhamida, Feb 04 2020

Keywords

Comments

For the generic case x^2 + (x + p^2)^2 = y^2 with p = m^2 - 2 a (prime) number in A028871, m>=7 (means p>=47), the first five consecutive solutions are: (0; p^2), (2*m^3+2*m^2-4*m-4; m^4+2*m^3-4*m-4), (4*m^3+8*m^2+8*m; m^4+4*m^3+12*m^2+8*m+4), (3*m^4-20*m^3+44*m^2-40*m+12; 5*m^4-28*m^3+60*m^2-56*m+20), (3*m^4-10*m^3+2*m^2+20*m-16; 5*m^4-14*m^3+28*m-20) and the other solutions are defined by: (X(n); Y(n))= (3*X(n-5)+2*Y(n-5)+p^2; 4*X(n-5)+3*Y(n-5)+2*p^2).
X(n) = 6*X(n-5) - X(n-10) + 2*p^2, and Y(n) = 6*Y(n-5) - Y(n-10) (can be easily proved using X(n) = 3*X(n-5) + 2*Y(n-5) + p^2, and Y(n) = 4*X(n-5) + 3*Y(n-5) + 2*p^2).

Examples

			For p=47 (m=7) the first five (5) consecutive solutions are (0, 2209), (752, 3055), (1820, 4421), (2231, 4969), (3995, 7379).
		

Crossrefs

Cf. A028871 (Primes of the form m^2 - 2).
Solutions x to x^2+(x+p^2)^2=y^2: A118554 (p=7), A207059 (p=17), A309998 (p=23), A331265 (p=31), this sequence (p=47).

Programs

  • Magma
    I:=[0, 752, 1820, 2231, 3995, 6627, 10575, 16511, 18840, 28952]; [n le 10 select I[n] else 6*Self(n-5) - Self(n-10)+4418: n in [1..100]];
    
  • Mathematica
    LinearRecurrence[{1, 0, 0, 0, 6, -6, 0, 0, 0, -1, 1}, {0, 752, 1820, 2231, 3995, 6627, 10575, 16511, 18840, 28952, 44180}, 40] (* Jean-François Alcover, Feb 08 2020 *)
  • PARI
    concat(0, Vec(x^2*(752 + 1068*x + 411*x^2 + 1764*x^3 + 2632*x^4 - 564*x^5 - 472*x^6 - 137*x^7 - 472*x^8 - 564*x^9) / ((1 - x)*(1 - 6*x^5 + x^10)) + O(x^40))) \\ Colin Barker, Feb 04 2020

Formula

a(n) = 6*a(n-5) - a(n-10) + 4418 for n >= 11; a(1)=0, a(2)=752, a(3)=1820, a(4)=2231, a(5)=3995, a(6)=6627, a(7)=10575, a(8)=16511, a(9)=18840, a(10)=28952.
From Colin Barker, Feb 04 2020: (Start)
G.f.: x^2*(752 + 1068*x + 411*x^2 + 1764*x^3 + 2632*x^4 - 564*x^5 - 472*x^6 - 137*x^7 - 472*x^8 - 564*x^9) / ((1 - x)*(1 - 6*x^5 + x^10)).
a(n) = a(n-1) + 6*a(n-5) - 6*a(n-6) - a(n-10) + a(n-11) for n>11.
(End)

A363102 Denominator of the continued fraction 1/(2-3/(3-4/(4-5/(...(n-1)-n/(-2))))).

Original entry on oeis.org

7, 7, 23, 17, 47, 31, 79, 7, 17, 71, 167, 97, 223, 127, 41, 23, 359, 199, 439, 241, 31, 41, 89, 337, 727, 1, 839, 449, 137, 73, 1087, 577, 1223, 647, 1367, 103, 1, 47, 73, 881, 1847, 967, 1, 151, 2207, 1151, 2399, 1249, 113, 193, 401, 1, 3023, 1567, 191, 41, 71, 257, 3719, 113, 3967, 89, 103, 311
Offset: 3

Views

Author

Mohammed Bouras, May 19 2023

Keywords

Comments

Conjecture 1: The sequence contains only 1's and primes.
Conjecture 2: All prime numbers appear either twice (same as A356247 and A357127) or three times.
Similar terms of A164314.
Conjecture: Record values correspond to A028871(m), m > 1. - Bill McEachen, Mar 06 2024
a(n) = 1 positions appear to correspond to A060515(m), m > 2. - Bill McEachen, Aug 05 2024

Examples

			a(5) = (5^2 - 2)/gcd(5^2 - 2, 2*A051403(5-3) + 5*A051403(5-4))= 23.
a(6) = a(11) = 6 + 11 = 17.
a(7) = a(40) = 7 + 40 = 47.
		

Crossrefs

Programs

  • PARI
    a051403(n) = (n+2)*sum(k=0, n, k!)/2;
    a(n) = (n^2 - 2)/gcd(n^2 - 2, 2*a051403(n-3) + n*a051403(n-4)); \\ Michel Marcus, May 24 2023

Formula

a(n) = (n^2 - 2)/gcd(n^2 - 2, 2*A051403(n-3) + n*A051403(n-4)).
a(n) = A164314(n) if A164314(n) > n.
If a(n) = a(m) and n < m < a(n), then a(n) = n + m.

A163158 Primes of the form f^2-2, where f is a Fibonacci number.

Original entry on oeis.org

2, 7, 23, 167, 439, 3023, 7919, 54287, 974167, 2550407, 32522920134767, 3372041405099481407, 9839618880490124200692486211717007, 724995932728680612729658820311719934835368079
Offset: 1

Views

Author

Keywords

Comments

A basic heuristic suggests that this sequence is infinite with about k * log_phi(n) members below n.
Indices of associated Fibonacci numbers are 3, 4, 5, 7, 8, 10, 11, 13, 16, 17, 34, 46, 83, 109, 113, 158, 181, 203, 350, 490, 491, 565, 1024, 1114, 2800, 4222, 4847, 4961, 11507, 12554, ...

Examples

			2^2-2=2, 3^2-2=7, 5^2-2=23
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=Fibonacci[n]^2-2; lst={};Do[If[PrimeQ[f[n]],AppendTo[lst,f[n]]],{n,6!}];lst

Extensions

Comments from Charles R Greathouse IV, Nov 09 2009

A225078 Numbers n such that n^2+1 and (n+1)^2-2 are both prime.

Original entry on oeis.org

1, 2, 4, 6, 14, 20, 26, 36, 54, 74, 116, 120, 126, 130, 134, 160, 176, 204, 210, 230, 236, 256, 264, 284, 300, 314, 340, 386, 420, 440, 466, 490, 496, 544, 594, 636, 644, 714, 750, 760, 784, 816, 930, 950, 986, 1070, 1124, 1140, 1146, 1156, 1174, 1176, 1210
Offset: 1

Views

Author

César Aguilera, Apr 26 2013

Keywords

Comments

Prime limits of the Legendré conjecture for a given n.

Examples

			n=2; n+1=3 ;n^2+1=5 and (n+1)^2-2=7.
n=490; n+1=491; n^2+1=240101 and (n+1)^2-2=241079.
		

Crossrefs

Programs

  • Haskell
    import Data.Function (on)
    import Data.List (elemIndices)
    a225078 n = a225078_list !! (n-1)
    a225078_list = elemIndices 1 $
       zipWith ((*) `on` a010051') a002522_list a008865_list
    -- Reinhard Zumkeller, May 06 2013
  • Mathematica
    Select[Range[2000], PrimeQ[#^2 + 1] && PrimeQ[(# + 1)^2 - 2] &] (* T. D. Noe, May 06 2013 *)

A241528 Primes p such that p + 1234567890 is also prime where 1234567890 is the first pandigital number with digits in order.

Original entry on oeis.org

17, 23, 37, 59, 131, 139, 157, 199, 241, 311, 353, 359, 397, 433, 479, 547, 673, 691, 769, 877, 937, 947, 953, 1051, 1091, 1097, 1181, 1297, 1301, 1409, 1451, 1471, 1489, 1531, 1609, 1619, 1697, 1709, 1861, 1879, 1889, 1913, 1951, 2053, 2063, 2089, 2099, 2113
Offset: 1

Views

Author

K. D. Bajpai, Apr 25 2014

Keywords

Examples

			17 is prime and appears in the sequence because 17 + 1234567890 = 1234567907, which is also prime.
23 is prime and appears in the sequence because 23 + 1234567890 = 1234567913, which is also prime.
19 is prime but not included in the sequence since 19 + 1234567890 = 1234567909 = (59107)*(20887), which is not prime.
		

Crossrefs

Programs

  • Maple
    KD := proc() local a,k; k:=ithprime(n);a:=k+1234567890; if isprime(a) then RETURN (k); fi; end: seq(KD(), n=1..1000);
  • Mathematica
    lst={}; Do[p=Prime[n]; If[PrimeQ[p+1234567890], AppendTo[lst,p]],{n,1,1000}]; lst
    (* For the b-file *)  c=0; k=Prime[n]; a=k+1234567890; Do[If[PrimeQ[a], c++; Print[c," ",k]],{n,1,10^5}]
    Select[Prime[Range[400]],PrimeQ[#+1234567890]&] (* Harvey P. Dale, Nov 18 2021 *)
  • PARI
    s=[]; forprime(p=2, 3000, if(isprime(p+1234567890), s=concat(s, p))); s \\ Colin Barker, Apr 25 2014
Previous Showing 31-40 of 46 results. Next