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.

Showing 1-10 of 49 results. Next

A261655 Squares equal to the difference between two successive primes of the form k^2+2 in the order in which they appear in A056899.

Original entry on oeis.org

1, 144, 1296, 3600, 176400, 156816, 2985984, 921600, 2702736, 11696400, 18974736, 21566736, 17740944, 5992704, 125888400, 7290000, 8363664, 12027024, 63680400, 210830400, 13838400, 72590400, 15116544, 15397776, 67568400, 128595600, 80784144, 93315600, 33039504
Offset: 1

Views

Author

Michel Lagneau, Aug 28 2015

Keywords

Comments

Note that all terms after the first are divisible by 144: for n>1 the sequence b(n) = sqrt(a(n)/144) is 1, 3, 5, 35, 33, 144, 80, 137, 285, 363, 387, 351, 204, 935, 225, 241, 289, ..., see A261659.
The proof that all terms are == 0 (mod 144) is simple once you realize that the primes == 11 (mod 72), see comment in A056899. - Robert G. Wilson v, Sep 03 2015

Examples

			A056899(2)- A056899(1) = 3-2 = 1^2;
A056899(5)- A056899(4) = 227-83 = 144 = 12^2;
A056899(14)- A056899(13) = 12323-11027 = 1296 = 36^2.
		

Crossrefs

Programs

  • Maple
    q:=2:for n from 1 to 10^7 do:p:=n^2+2:if isprime(p) then x:=p-q:q:=p: z:=sqrt(x):if z=floor(z) then printf(`%d, `, x):else fi:fi:od:
  • Mathematica
    Select[ Differences[ Select[ Range[0, 1000000], PrimeQ[#^2 + 2] &]^2], IntegerQ@ Sqrt@# &] (* or *)
    k = 1; p = 3; lst = {1}; While[k < 10000001, q = (6k +3)^2 + 2; If[ PrimeQ@ q, If[ IntegerQ@ Sqrt[q - p], AppendTo[lst, q - p]]; p = q]; k++] (* Robert G. Wilson v, Sep 03 2015 *)

A089921 Duplicate of A056899.

Original entry on oeis.org

2, 3, 11, 83, 227, 443, 1091, 1523, 2027, 3251, 6563, 9803, 11027, 12323, 13691
Offset: 1

Views

Author

Keywords

A224519 For n >= 4, a(n) = (A056899(n) - A056899(n-1))/72, where A056899 lists the primes of the form k^2 + 2.

Original entry on oeis.org

1, 2, 3, 9, 6, 7, 17, 46, 45, 17, 18, 19, 20, 90, 106, 260, 37, 77, 40, 41, 42, 132, 190, 50, 51, 105, 222, 58, 119, 61, 62, 127, 335, 70, 71, 145, 74, 75, 310, 326, 169, 531, 92, 93, 189, 490, 101, 735, 442, 113, 345, 235, 854, 510, 660, 271, 414, 710, 438
Offset: 4

Views

Author

Michel Lagneau, Apr 09 2013

Keywords

Comments

For n >= 3, all prime of the form n^2 + 2 (A056899) are equal to 11 modulo 72.
Observation: this sequence contains couples of consecutive numbers: (2,3), (6,7), (17, 18), (18, 19), (19, 20), (40, 41), (41, 42), ..., (1238, 1239), (1272, 1273), ...
Conjecture: the number of couples such that a(n+1) = a(n) + 1 is infinite.
Consequence: there exists an infinity of triples with 3 successive primes p1 < p2 < p3 of the form n^2 + 2 such that p2 = (p1 + p3)/2 - 36.
Proof: if the conjecture is true, a(n+1) - a(n) = 1 =>
(1) p2 - p1 = 72a
(2) p3 - p2 = 72(a+1)
and (2) - (1) => p2 = (p1 + p3)/2 - 36.
The triples of primes are (11, 83, 227), (83, 227, 443), (1091, 1523, 2027), (11027, 12323, 13691), ...

Examples

			a(5) = (A056899(5) - A056899(4))/72 = (227 - 83)/72 = 2.
		

Crossrefs

Programs

  • Maple
    with(numtheory): T:=array(1..100):k:=0:for n from 3 to 2000 do: if type(n^2+2,prime)=true then k:=k+1:T[k]:=n^2+1:else fi:od:for i from 1 to k do: printf(`%d, `,(T[i+1]-T[i])/72):od:

A059100 a(n) = n^2 + 2.

Original entry on oeis.org

2, 3, 6, 11, 18, 27, 38, 51, 66, 83, 102, 123, 146, 171, 198, 227, 258, 291, 326, 363, 402, 443, 486, 531, 578, 627, 678, 731, 786, 843, 902, 963, 1026, 1091, 1158, 1227, 1298, 1371, 1446, 1523, 1602, 1683, 1766, 1851, 1938, 2027, 2118, 2211, 2306, 2403, 2502, 2603
Offset: 0

Views

Author

Henry Bottomley, Feb 13 2001

Keywords

Comments

Let s(n) = Sum_{k>=1} 1/n^(2^k). Then I conjecture that the maximum element in the continued fraction for s(n) is n^2 + 2. - Benoit Cloitre, Aug 15 2002
Binomial transformation yields A081908, with A081908(0)=1 dropped. - R. J. Mathar, Oct 05 2008
1/a(n) = R(n)/r with R(n) the n-th radius of the Pappus chain of the symmetric arbelos with semicircle radii r, r1 = r/2 = r2. See the MathWorld link for Pappus chain (there are two of them, a left and a right one. In this case these two chains are congruent). - Wolfdieter Lang, Mar 01 2013
a(n) is the number of election results for an election with n+2 candidates, say C1, C2, ..., and C(n+2), and with only two voters (each casting a single vote) that have C1 and C2 receiving the same number of votes. See link below. - Dennis P. Walsh, May 08 2013
This sequence gives the set of values such that for sequences b(k+1) = a(n)*b(k) - b(k-1), with initial values b(0) = 2, b(1) = a(n), all such sequences are invariant under this transformation: b(k) = (b(j+k) + b(j-k))/b(j), except where b(j) = 0, for all integer values of j and k, including negative values. Examples are: at n=0, b(k) = 2 for all k; at n=1, b(k) = A005248; at n=2, b(k) = 2*A001541; at n=3, b(k)= A057076; at n=4, b(k) = 2*A023039. This b(k) family are also the transformation results for all related b'(k) (i.e., those with different initial values) including non-integer values. Further, these b(k) are also the bisections of the transformations of sequences of the form G(k+1) = n * G(k) + G(k-1), and those bisections are invariant for all initial values of g(0) and g(1), including non-integer values. For n = 1 this g(k) family includes Fibonacci and Lucas, where the invariant bisection is b(k) = A005248. The applicable bisection for this transformation of g(k) is for the odd values of k, and applies for all n. Also see A000032 for a related family of sequences. - Richard R. Forberg, Nov 22 2014
Also the number of maximum matchings in the n-gear graph. - Eric W. Weisstein, Dec 31 2017
Also the Wiener index of the n-dipyramidal graph. - Eric W. Weisstein, Jun 14 2018
Numbers of the form n^2+2 have no factors that are congruent to 7 (mod 8). - Gordon E. Michaels, Sep 12 2019
For n >= 1, the continued fraction expansion of sqrt(a(n)) is [n; {n, 2n}]. - Magus K. Chu, Sep 10 2022

Examples

			For n = 2, a(2) = 6 since there are 6 election results in a 4-candidate, 2-voter election that have candidates c1 and c2 tied. Letting <i,j> denote voter 1 voting for candidate i and voter 2 voting for candidate j, the six election results are <1,2>, <2,1>, <3,3>, <3,4>, <4,3>, and <4,4>. - _Dennis P. Walsh_, May 08 2013
		

Crossrefs

Apart from initial terms, same as A010000.
2nd row/column of A295707.

Programs

Formula

G.f.: (2 - 3*x + 3*x^2)/(1 - x)^3. - R. J. Mathar, Oct 05 2008
a(n) = ((n - 2)^2 + 2*(n + 1)^2)/3. - Reinhard Zumkeller, Feb 13 2009
a(n) = A000196(A156798(n) - A000290(n)). - Reinhard Zumkeller, Feb 16 2009
a(n) = 2*n + a(n-1) - 1 with a(0) = 2. - Vincenzo Librandi, Aug 07 2010
a(n+3) = (A166464(n+5) - A166464(n))/20. - Paul Curtz, Nov 07 2012
From Paul Curtz, Nov 07 2012: (Start)
a(3*n) mod 9 = 2.
a(3*n+1) = 3*A056109(n).
a(3*n+2) = 3*A056105(n+1). (End)
Sum_{n >= 1} 1/a(n) = Pi * coth(sqrt(2)*Pi) / 2^(3/2) - 1/4. - Vaclav Kotesovec, May 01 2018
From Amiram Eldar, Jan 29 2021: (Start)
Sum_{n>=0} (-1)^n/a(n) = (1 + sqrt(2)*Pi*(csch(sqrt(2)*Pi)))/4.
Product_{n>=0} (1 + 1/a(n)) = sqrt(3/2)*csch(sqrt(2)*Pi)*sinh(sqrt(3)*Pi).
Product_{n>=0} (1 - 1/a(n)) = csch(sqrt(2)*Pi)*sinh(Pi)/sqrt(2). (End)
E.g.f.: exp(x)*(2 + x + x^2). - Stefano Spezia, Aug 07 2024

A146326 Length of the period of the continued fraction of (1+sqrt(n))/2.

Original entry on oeis.org

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

Views

Author

Artur Jasinski, Oct 30 2008

Keywords

Comments

First occurrence of n in this sequence see A146343.
Records see A146344.
Indices where records occurred see A146345.
a(n) =0 for n = k^2 (A000290).
a(n) =1 for n = 4 k^2 + 4 k + 5 (A078370). For primes see A005473.
a(n) =2 for n in A146327. For primes see A056899.
a(n) =3 for n in A146328. For primes see A146348.
a(n) =4 for n in A146329. For primes see A028871 - {2}.
a(n) =5 for n in A146330. For primes see A146350.
a(n) =6 for n in A146331. For primes see A146351.
a(n) =7 for n in A146332. For primes see A146352.
a(n) =8 for n in A146333. For primes see A146353.
a(n) =9 for n in A143577. For primes see A146354.
a(n)=10 for n in A146334. For primes see A146355.
a(n)=11 for n in A146335. For primes see A146356.
a(n)=12 for n in A146336. For primes see A146357.
a(n)=13 for n in A333640. For primes see A146358.
a(n)=14 for n in A146337. For primes see A146359.
a(n)=15 for n in A146338. For primes see A146360.
a(n)=16 for n in A146339. For primes see A146361.
a(n)=17 for n in A146340. For primes see A146362.

Examples

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

Crossrefs

Programs

  • Maple
    A146326 := proc(n) if not issqr(n) then numtheory[cfrac]( (1+sqrt(n))/2, 'periodic','quotients') ; nops(%[2]) ; else 0 ; fi; end: seq(A146326(n),n=1..100) ; # R. J. Mathar, Sep 06 2009
  • Mathematica
    Table[cf = ContinuedFraction[(1 + Sqrt[n])/2]; If[Head[cf[[-1]]] === List, Length[cf[[-1]]], 0], {n, 100}]
    f[n_] := Length@ ContinuedFraction[(1 + Sqrt[n])/2][[-1]]; Array[f, 100] (* Robert G. Wilson v, Apr 11 2017 *)

Formula

a(n) = 0 iff n is a square (A000290). - Robert G. Wilson v, Apr 11 2017

Extensions

a(39) and a(68) corrected by R. J. Mathar, Sep 06 2009

A054269 Length of period of continued fraction for sqrt(prime(n)).

Original entry on oeis.org

1, 2, 1, 4, 2, 5, 1, 6, 4, 5, 8, 1, 3, 10, 4, 5, 6, 11, 10, 8, 7, 4, 2, 5, 11, 1, 12, 6, 15, 9, 12, 6, 9, 18, 9, 20, 17, 18, 4, 5, 14, 21, 16, 13, 1, 20, 26, 4, 2, 5, 11, 12, 17, 14, 1, 12, 3, 24, 21, 13, 18, 5, 14, 16, 17, 11, 34, 19, 14, 7, 15, 4, 20, 5, 30, 8, 9, 21, 1, 21, 18, 37, 16
Offset: 1

Views

Author

N. J. A. Sloane, May 05 2000

Keywords

Comments

The following sequences (allowing offset of first term) all appear to have the same parity: A034953, triangular numbers with prime indices; A054269, length of period of continued fraction for sqrt(p), p prime; A082749, difference between the sum of next prime(n) natural numbers and the sum of next n primes; A006254, numbers n such that 2n-1 is prime; A067076, 2n+3 is a prime. - Jeremy Gardiner, Sep 10 2004
Note that primes of the form n^2+1 (A002496) have a continued fraction whose period length is 1; odd primes of the form n^2+2 (A056899) have length 2; odd primes of the form n^2-2 (A028871) have length 4. - T. D. Noe, Nov 03 2006
For an odd prime p, the length of the period is odd if p=1 (mod 4) or even if p=3 (mod 4). - T. D. Noe, May 22 2007

Crossrefs

Cf. A003285, A130272 (primes at which the period length sets a new record).

Programs

  • Maple
    with(numtheory): for i from 1 to 150 do cfr := cfrac(ithprime(i)^(1/2), 'periodic','quotients'); printf(`%d,`, nops(cfr[2])) od:
  • Mathematica
    Table[p=Prime[n]; Length[Last[ContinuedFraction[Sqrt[p]]]],{n,100}] (* T. D. Noe, May 22 2007 *)
    Length[ContinuedFraction[Sqrt[#]][[2]]]&/@Prime[Range[100]] (* Harvey P. Dale, Sep 28 2024 *)

Extensions

More terms from James Sellers, May 05 2000

A049423 Primes of the form k^2 + 3.

Original entry on oeis.org

3, 7, 19, 67, 103, 199, 487, 787, 1447, 2503, 2707, 3847, 4099, 4903, 5479, 5779, 8467, 8839, 11239, 12547, 14887, 16903, 17959, 19603, 21319, 23719, 24967, 25603, 29587, 31687, 47527, 52903, 58567, 59539, 61507, 65539, 75079, 81799, 88807
Offset: 1

Views

Author

Paul Jobling (paul.jobling(AT)whitecross.com)

Keywords

Comments

Note that all terms after the first are congruent to 7 modulo 12.

Examples

			19 is prime and is equal to 4^2 + 3, so 19 is a term.
		

Crossrefs

Cf. A002496, A056899. Note that apart from first term, all of (a(n)-7)/12 have to be terms of A001082 for a(n) to be prime.

Programs

  • Magma
    [n: n in PrimesUpTo(175000) | IsSquare(n-3)];  // Bruno Berselli, Apr 05 2011
    
  • Magma
    [a: n in [0..300] | IsPrime(a) where a is n^2+3]; // Vincenzo Librandi, Dec 08 2011
    
  • Mathematica
    Intersection[Table[n^2+3,{n,0,10^2}],Prime[Range[9*10^3]]] ...or... For[i=3,i<=3,a={};Do[If[PrimeQ[n^2+i],AppendTo[a,n^2+i]],{n,0,100}];Print["n^2+",i,",",a];i++ ] (* Vladimir Joseph Stephan Orlovsky, Apr 29 2008 *)
    Select[Table[n^2+3,{n,0,198000}],PrimeQ] (* Vincenzo Librandi, Dec 08 2011 *)
  • PARI
    list(lim)=my(v=List(),t); forstep(k=0,sqrtint(lim\1-3),2, if(isprime(t=k^2+3), listput(v,t))); Vec(v) \\ Charles R Greathouse IV, Nov 06 2024

Formula

Primes m such that m-3 is a square.
For n>0, a(n) = 36*A056902(n-1)^2 + 24*A056902(n-1) + 7. - Henry Bottomley, Jul 06 2000
a(n) = 3 + (2*A097697(n-1))^2. - R. J. Mathar, Aug 07 2008
a(n) >> n^2 log n. - Charles R Greathouse IV, Nov 06 2024

A056900 Numbers n where 36n^2+36n+11 is prime.

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 7, 9, 13, 16, 17, 18, 19, 20, 24, 28, 36, 37, 39, 40, 41, 42, 45, 49, 50, 51, 53, 57, 58, 60, 61, 62, 64, 69, 70, 71, 73, 74, 75, 79, 83, 85, 91, 92, 93, 95, 100, 101, 108, 112, 113, 116, 118, 125, 129, 134, 136, 139, 144
Offset: 0

Views

Author

Henry Bottomley, Jul 05 2000

Keywords

Comments

36m^2+36m+11=(6m+3)^2+2, i.e. two more than the square of odd multiples of 3. 36m^2+36m+11=72*(m*(m+1)/2)+11, i.e. eleven more than seventy-two times triangular numbers.

Examples

			a(3)=3 because 36*3^2+36*3+11=443 which is prime
		

Crossrefs

This sequence (with the formula above) generates all except the first two terms of the sequence of primes of the form k^2+2, A056899.
Cf. A091199.

Programs

  • Magma
    [n: n in [0..200]| IsPrime(36*n^2+36*n+11)]; // Vincenzo Librandi, Jul 14 2012
  • Mathematica
    lst={};Do[If[PrimeQ[36*n^2+36*n+11],AppendTo[lst,n]],{n,0,100}];lst (* Vincenzo Librandi, Jul 14 2012 *)
    Select[Range[0,200],PrimeQ[36#^2+36#+11]&] (* Harvey P. Dale, Sep 19 2020 *)

Formula

a(n) =A002024((A056899(n+2)-11)/72)
a(n) = A091199(n+1) - 1. - Jeppe Stig Nielsen, May 14 2017

A056905 Primes of the form k^2 + 5.

Original entry on oeis.org

5, 41, 149, 1301, 2309, 5189, 6089, 9221, 13001, 15881, 26249, 28229, 39209, 41621, 60521, 66569, 86441, 112901, 116969, 138389, 171401, 186629, 207941, 213449, 242069, 254021, 266261, 285161, 304709, 331781, 345749, 352841, 389381, 443561
Offset: 1

Views

Author

Henry Bottomley, Jul 07 2000

Keywords

Comments

Except for a(0), a(n) mod 180 = 41 or 149 since k must be a multiple of 6 without being a multiple of 30 for k^2+5 to be prime.

Examples

			a(2)=149 since 12^2 + 5 = 149, which is prime.
		

Crossrefs

Programs

  • Magma
    [a: n in [0..700] | IsPrime(a) where a is n^2+5]; // Vincenzo Librandi, Nov 30 2011
    
  • Mathematica
    Select[Table[n^2+5,{n,0,7000}],PrimeQ] (* Vincenzo Librandi, Nov 30 2011 *)
  • PARI
    is(n) = ispseudoprime(n) && issquare(n-5) \\ Felix Fröhlich, May 25 2018

Formula

a(n) = 36 * A056906(n) + 5.

A056909 Primes of the form k^2+6.

Original entry on oeis.org

7, 31, 127, 367, 631, 967, 1231, 3727, 4231, 6247, 7927, 8287, 11887, 17167, 21031, 22807, 30631, 34231, 39607, 48847, 72367, 108247, 109567, 126031, 160807, 185767, 198031, 231367, 235231, 261127, 265231, 279847, 290527, 323767, 354031, 366031, 373327, 421207
Offset: 1

Views

Author

Henry Bottomley, Jul 07 2000

Keywords

Comments

a(n) mod 120 = 7 or 31 for all n.

Examples

			a(2)=127 since 11^2+6=127 which is prime.
		

Crossrefs

Programs

  • Magma
    [a: n in [0..700] | IsPrime(a) where a is n^2+6]; // Vincenzo Librandi, Nov 30 2011
    
  • Mathematica
    Intersection[Table[n^2+6,{n,0,10^2}],Prime[Range[9*10^3]]] (* or *) For[i=6,i<=6,a={};Do[If[PrimeQ[n^2+i],AppendTo[a,n^2+i]],{n,0,100}];Print["n^2+",i,",",a];i++ ] (* Vladimir Joseph Stephan Orlovsky, Apr 29 2008 *)
    Select[Table[n^2+6,{n,0,7000}],PrimeQ] (* Vincenzo Librandi, Nov 30 2011 *)
  • PARI
    list(lim)=my(v=List(),t); forstep(k=1,sqrtint(lim\1-6),2, if(isprime(t=k^2+6), listput(v,t))); Vec(v) \\ Charles R Greathouse IV, Nov 06 2024

Formula

a(n) = 36*A056910(n)^2 + 12*A056910(n) + 7.
a(n) >> n^2 log n. - Charles R Greathouse IV, Nov 06 2024
Showing 1-10 of 49 results. Next