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-8 of 8 results.

A096650 Indices of prime Pell numbers.

Original entry on oeis.org

2, 3, 5, 11, 13, 29, 41, 53, 59, 89, 97, 101, 167, 181, 191, 523, 929, 1217, 1301, 1361, 2087, 2273, 2393, 8093, 13339, 14033, 23747, 28183, 34429, 36749, 90197
Offset: 1

Views

Author

Julien Peter Benney (jpbenney(AT)ftml.net), Aug 15 2004

Keywords

Comments

For a Pell number to be prime, the index must be prime. The indices greater than 523 yield probable primes. No others less than 100000. - T. D. Noe, Sep 13 2004
n divides m if and only if A000129(n) divides A000129(m). This is the reason of the fact that this sequence is a subsequence of A000040. For complement of this sequence see A270387. - Altug Alkan, Apr 29 2016

Examples

			P(11)=5741, which is prime.
		

Crossrefs

Cf. A000129 (Pell numbers), A086383 (prime Pell numbers), A270387.

Programs

  • Maple
    Pell:= gfun:-rectoproc( {a(0) = 0, a(1) = 1, a(n) = 2*a(n-1) + a(n-2)},a(n), remember):
    select(t -> isprime(t) and isprime(Pell(t)), [2, seq(2*i+1, i=1..2000)]); # Robert Israel, Aug 28 2015
  • Mathematica
    lst={}; a=0; b=1; Do[c=a+2b; a=b; b=c; If[PrimeQ[c], AppendTo[lst, n]], {n, 2, 10000}]; lst (* T. D. Noe, Aug 17 2004 *)
    Flatten@ Position[#, p_ /; PrimeQ@ p] - 1 &@ CoefficientList[Series[x/(1 - 2 x - x^2), {x, 0, 5000}], x] (* Michael De Vlieger, Apr 29 2016, after Stefan Steinerberger at A000129 *)

Extensions

More terms from T. D. Noe, Aug 17 2004
Further terms from T. D. Noe, Sep 13 2004

A086395 Primes found among the numerators of the continued fraction rational approximations to sqrt(2).

Original entry on oeis.org

3, 7, 17, 41, 239, 577, 665857, 9369319, 63018038201, 489133282872437279, 19175002942688032928599, 123426017006182806728593424683999798008235734137469123231828679
Offset: 1

Views

Author

Cino Hilliard, Sep 06 2003, Jul 30 2004, Oct 02 2005

Keywords

Comments

Or, starting with the fraction 1/1, the prime numerators of fractions built according to the rule: add top and bottom to get the new bottom, add top and twice bottom to get the new top. Or, A001333(n) is prime.
The transformation of fractions is 1/1 -> 3/2 -> 7/5 -> 17/12 -> 41/29 -> ... A001333(n)/A000129(n). - R. J. Mathar, Aug 18 2008
Is this sequence infinite?

References

  • Prime Obsession, John Derbyshire, Joseph Henry Press, April 2004, p 16.

Crossrefs

Programs

  • Mathematica
    Select[Numerator[Convergents[Sqrt[2],250]],PrimeQ] (* Harvey P. Dale, Oct 19 2011 *)
  • PARI
    \Continued fraction rational approximation of numeric constants f. m=steps. cfracnumprime(m,f) = { default(realprecision,3000); cf = vector(m+10); x=f; for(n=0,m, i=floor(x); x=1/(x-i); cf[n+1] = i; ); for(m1=0,m, r=cf[m1+1]; forstep(n=m1,1,-1, r = 1/r; r+=cf[n]; ); numer=numerator(r); denom=denominator(r); if(ispseudoprime(numer),print1(numer,",")); ) }
    
  • PARI
    primenum(n,k,typ) = \yp = 1 num, 2 denom. print only prime num or denom. { local(a,b,x,tmp,v); a=1;b=1; for(x=1,n, tmp=b; b=a+b; a=k*tmp+a; if(typ==1,v=a,v=b); if(isprime(v),print1(v","); ) ); print(); print(a/b+.) }

Formula

a(n) = A001333(A099088(n)). - R. J. Mathar, Feb 01 2024

Extensions

Edited by N. J. A. Sloane, Aug 23 2008 at the suggestion of R. J. Mathar

A246556 a(n) = smallest prime which divides Pell(n) = A000129(n) but does not divide any Pell(k) for k

Original entry on oeis.org

2, 5, 3, 29, 7, 13, 17, 197, 41, 5741, 11, 33461, 239, 269, 577, 137, 199, 37, 19, 45697, 23, 229, 1153, 1549, 79, 53, 113, 44560482149, 31, 61, 665857, 52734529, 103, 1800193921, 73, 593, 9369319, 389, 241, 1746860020068409, 4663, 11437, 43, 6481, 47, 3761, 97, 293, 45245801, 101, 22307, 68480406462161287469, 7761799, 109, 1535466241
Offset: 2

Views

Author

Eric Chen, Nov 15 2014

Keywords

Comments

First differs from A264137 (Largest prime factor of the n-th Pell number) at n=17; see Example section. - Jon E. Schoenfield, Dec 10 2016

Examples

			a(2) = 2 because Pell(2) = 2 and Pell(k) < 2 for k < 2.
a(4) = 3 because Pell(4) = 12 = 2^2 * 3, but 2 is not a primitive prime factor since Pell(2) = 2, so therefore 3 is the primitive prime factor.
a(5) = 29 because Pell(5) = 29, which is prime.
a(6) = 7 because Pell(6) = 70 = 2 * 5 * 7, but neither 2 nor 5 is a primitive prime factor, so therefore 7 is the primitive prime factor.
a(17) = 137 because Pell(17) = 1136689 = 137 * 8297, and both of them are primitive factors, we choose the smallest. (Pell(17) is the smallest Pell number with more than one primitive prime factor.)
		

Crossrefs

Cf. A001578 (for Fibonacci(n)), A000129 (Pell numbers), A008555, A086383, A096650, A120947, A175181, A214028, A264137.

Programs

  • Mathematica
    prms={}; Table[f=First/@FactorInteger[Pell[n]]; p=Complement[f, prms]; prms=Join[prms, p]; If[p=={}, 1, First[p]], {n, 36}]

Formula

a(n) >= 2 for all n >= 2, by Carmichael's theorem. - Jonathan Sondow, Dec 08 2017

Extensions

Edited by N. J. A. Sloane, Nov 29 2014
Terms up to a(612) in b-file added by Sean A. Irvine, Sep 23 2019
Terms a(613)-a(630) in b-file added by Max Alekseyev, Aug 26 2021

A056869 Prime hypotenuses of Pythagorean triangles with consecutive integer sides.

Original entry on oeis.org

5, 29, 5741, 33461, 44560482149, 1746860020068409, 68480406462161287469, 13558774610046711780701, 4125636888562548868221559797461449, 4760981394323203445293052612223893281
Offset: 1

Views

Author

Harvey P. Dale, Sep 02 2000

Keywords

Comments

These primes belong to A001653.
From Jianing Song, Jan 02 2019: (Start)
Essentially the same sequence as A086383.
If p is a term then it is a unique-period prime in base sqrt(2*p^2 - 1). (End)

Examples

			29 is included because it is prime and it is the hypotenuse of the 20, 21, 29 Pythagorean triangle.
		

Crossrefs

Programs

  • GAP
    f:=[1,5];; for n in [3..60] do f[n]:=6*f[n-1]-f[n-2]; od; a:=Filtered(f,IsPrime);; Print(a); # Muniru A Asiru, Jan 03 2019
  • Maple
    f:= gfun:-rectoproc({a(n)=6*a(n-1)-a(n-2),a(1)=1,a(2)=5},a(n),remember):
    select(isprime, [seq(f(n),n=1..1000)]); # Robert Israel, Oct 13 2015
  • Mathematica
    Select[Sqrt[#^2+(#+1)^2]&/@With[{p=3+2Sqrt[2]},NestList[Floor[p #]+3&,3,120]],PrimeQ] (* Harvey P. Dale, May 02 2018 *)
  • PARI
    t(n) = if(n<3, 5^(n-1), 6*t(n-1)-t(n-2));
    for(n=1, 50, if(isprime(t(n)), print1(t(n)", "))) \\ Altug Alkan, Oct 13 2015
    

Formula

a(n) = A086383(n+1). - Jianing Song, Jan 02 2019

Extensions

Incorrect link to index entries for linear recurrences with constant coefficients removed by Colin Barker, Oct 13 2015
Offset changed to 1 by Colin Barker, Oct 13 2015

A118612 Denominator if the numerator and denominator of the continued fraction rational approximation of sqrt(2) are both prime.

Original entry on oeis.org

2, 5, 29, 44560482149, 13558774610046711780701
Offset: 1

Views

Author

Joshua Zucker, May 08 2006

Keywords

Comments

Next term, if it exists, is bigger than 489 digits (the 1279th convergent to sqrt(2)).

Crossrefs

A086397 has the numerators. This sequence is a subsequence of A000129, A086383 and A101411.

Programs

  • Mathematica
    For[n = 2, n < 1500, n++, a := Join[{1}, Table[2, {i, 2, n}]]; If[PrimeQ[Denominator[FromContinuedFraction[a]]], If[PrimeQ[Numerator[FromContinuedFraction[a]]], Print[Denominator[FromContinuedFraction[a]]]]]] (* Stefan Steinerberger, May 09 2006 *)

A164986 Numbers of the form 2p^2 = q^2 + 1, where p and q are primes.

Original entry on oeis.org

50, 1682, 3971273138702695316402, 367680737852094722224630791187352516632102802
Offset: 1

Views

Author

Rick L. Shepherd, Sep 03 2009

Keywords

Comments

A079704 INTERSECT A002522. Subsequence of A088920 (Solutions k to the Diophantine equation k = 2n^2 = m^2+1): those terms for which associated m in A002315 and n in A001653 are both prime.
Corresponding p are prime Pell numbers (prime denominators of continued fraction convergents to sqrt(2)).
Corresponding q are prime numerators of the continued fraction convergents to sqrt(2).
Corresponding p, q, p^2, q^2, (p,q), (q,p), etc., form subsequences of many other OEIS sequences; see cross-references.
Any further terms are too large to include here.

Examples

			a(1) = 50 as 50 = 2*5^2 = 7^2 + 1, where 5 and 7 are prime.
		

Crossrefs

Cf. A088920, A118612, A086397, A086395, A002315 (NSW numbers), A088165 (prime NSW numbers = prime RMS numbers (A140480)), A001653, A000129 (Pell numbers), A086383, A101411, A079704, A002522, A008843, A104683, A163742, etc.

Formula

a(n) = 2*(A118612(n+1))^2 = (A086397(n+1))^2 + 1.

A247250 Indices of Pell numbers having exactly one primitive prime factor.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 21, 24, 29, 30, 32, 33, 35, 38, 41, 42, 50, 53, 54, 56, 58, 59, 66, 69, 89, 90, 94, 95, 97, 99, 101, 104, 117, 118, 120, 135, 138, 160, 167, 181, 191, 210, 221, 237, 242, 247
Offset: 1

Views

Author

Eric Chen, Nov 29 2014

Keywords

Comments

Conjecture: The n-th Pell number A000129(n) has a primitive prime factor for all n > 1. (The n-th Fibonacci number A000045(n) has a primitive prime factor for all n except n = 0, 1, 2, 6, and 12.)
For prime p, all prime factors of Pell(p) are primitive. Hence the only primes in this sequence are the prime numbers in A096650, which gives the indices of prime Pell numbers.

Examples

			Pell(1) = 1, which has no prime factors, so 1 is not in this sequence.
Pell(4) = 12 = 2^2 * 3, but 2 is not a primitive prime factor, and 3 is the only primitive prime factor of Pell(4), so 4 is in this sequence.
Pell(5) = 29, which is a prime and the only primitive prime factor of itself, so 5 is in this sequence.
Pell(12) = 13860 = 2^2 * 3^2 * 5 * 7 * 11, but none of 2, 3, 5, 7 is a primitive prime factor, and 11 is the only primitive prime factor of Pell(12), so 12 is in this sequence.
Pell(14) = 80782 = 2 * 13^2 * 239, but neither 2 nor 13 is a primitive prime factor, and 239 is the only primitive prime factor of Pell(14), so 14 is in this sequence.
Pell(19) = 6625109 = 37 * 179057, both of which are primitive prime factors of Pell(19), so 19 is not in this sequence.
		

Crossrefs

Cf. A152012 (for Fibonacci numbers).

Programs

  • Mathematica
    Select[Range[1000], PrimePowerQ[(1-Sqrt[2])^EulerPhi[#]*Cyclotomic[#, (1+Sqrt[2])/(1-Sqrt[2])]/GCD[Cyclotomic[#, (1+Sqrt[2])/(1-Sqrt[2])], # ]]&] - Eric Chen, Dec 12 2014
    pell[n_] := pell[n] = ((1+Sqrt[2])^n-(1-Sqrt[2])^n )/(2*Sqrt[2]) // Round; primitivePrimeFactors[n_] := Cases[FactorInteger[pell[n]][[All, 1]], p_ /; And @@ (GCD[p, #] == 1 & /@ Array[pell, n-1])]; Reap[For[n=2, n <= 200, n++, If[Length[primitivePrimeFactors[n]] == 1, Print[n]; Sow[n]]]][[2, 1]] (* Jean-François Alcover, Dec 12 2014 *)
  • PARI
    pell(n) = imag((1 + quadgen(8))^n);
    isok(pf, vp) = sum(i=1, #pf, vecsearch(vp, pf[i]) == 0) == 1;
    lista(nn) = {vp = []; for (n=2, nn, pf = factor(pell(n))[,1]; if (isok(pf, vp), print1(n, ", ")); vp = vecsort(concat(vp, pf),, 8););} \\ Michel Marcus, Nov 29 2014

Extensions

Two incorrect terms (72 and 110) deleted by Colin Barker, Nov 29 2014
More terms from Colin Barker, Nov 30 2014

A305534 Index of the smallest prime in the n-Fibonacci sequence, or the Lucas U(n,-1) sequence.

Original entry on oeis.org

3, 2, 2, 3, 2, 3, 2, 5, 29, 3, 2, 5, 2, 3, 23, 3, 2, 7, 2, 3, 29, 19, 2, 3, 83, 3, 53, 19, 2, 5, 2, 5, 5, 5479, 71, 3, 2, 17, 11, 3, 2, 37, 2, 31, 5, 11, 2, 5
Offset: 1

Views

Author

Eric Chen, Jun 04 2018

Keywords

Comments

Smallest k such that the k-th Fibonacci polynomial evaluated at x=n is prime. (The first few Fibonacci polynomials are 1, x, x^2 + 1, x^3 + 2*x, x^4 + 3*x^2 + 1, x^5 + 4*x^3 + 3*x, ...)
All terms are primes, since if a divides b, then the a-th term of the n-Fibonacci sequence also divides the b-th term of the n-Fibonacci sequence.
Corresponding primes are 2, 2, 3, 17, 5, 37, 7, 4289, 726120289954448054047428229, 101, 11, 21169, 13, 197, 82088569942721142820383601, 257, 17, 34539049, 19, 401, ...
a(n) = 2 if and only if n is prime.
a(n) = 3 if and only if n^2 + 1 is prime (A005574), except n=2 (since 2 is the only prime p such that p^2 + 1 is also prime).
a(34) > 1024, does a(n) exist for all n >= 1? (However, 17 is the only prime in the first 1024 terms of the 4-Fibonacci sequence, and it seems that 17 is the only prime in the 4-Fibonacci sequence.)
a(35)..a(48) = 71, 3, 2, 17, 11, 3, 2, 37, 2, 31, 5, 11, 2, 5, a(50)..a(54) = 11, 11, 23, 2, 3, a(56) = 3, a(58)..a(75) = 5, 2, 47, 2, 5, 311, 13, 233, 3, 2, 5, 11, 5, 2, 7, 2, 3, 5. Unknown terms a(34), a(49), a(55), a(57), exceed 1024, if they exist.
a(49) > 20000, if it exists. - Giovanni Resta, Jun 06 2018

Crossrefs

Cf. A001605, A096650, A209493, which are the indices of the primes in the n-Fibonacci sequence for n = 1, 2, 3.
Cf. A005478, A086383, A201001, which are the primes in the n-Fibonacci sequence for n = 1, 2, 3.
Cf. A000045, A000129, A006190, A001076, A052918, A005668, A054413, A041025, A099371, A041041, A049666, A041061 (the n-Fibonacci sequence for n = 1 to 12).
Cf. A302990 (for n-step Fibonacci sequence instead of n-Fibonacci sequence).

Programs

  • PARI
    b(n,k)=([n,1;1,0]^k)[1,2]
    a(n)=for(k=1,2^12,if(ispseudoprime(b(n,k)),return(k)))

Extensions

a(34)-a(48) from Giovanni Resta, Jun 06 2018
Showing 1-8 of 8 results.