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

A175600 Primes of form 4k+1 where k is a Pythagorean prime.

Original entry on oeis.org

53, 149, 293, 389, 773, 1109, 1493, 1637, 1733, 2309, 2693, 2837, 3413, 3989, 4133, 4373, 4517, 5189, 5717, 5813, 6197, 6389, 7013, 7109, 8069, 8117, 9173, 9749, 10709, 10853, 11813, 12149, 12197, 12437, 12917, 13829, 13877, 14549, 15077, 15173
Offset: 1

Views

Author

Zak Seidov, Jul 22 2010

Keywords

Comments

"Double-Pythagorean" primes: primes of form 4k+1 with k prime of form 4m+1.
All terms are congruent to 5 modulo 48. - Zak Seidov, Jun 05 2014

Examples

			53 = A002144(7) = 4*13 + 1, 13 = A002144(2);
149 = A002144(16) = 4*37 + 1, 37 = A002144(5).
		

Crossrefs

Cf. A002144 (Pythagorean primes: primes of form 4n+1), A005098 (Numbers n such that 4n+1 is prime).

Programs

  • Mathematica
    se=Select[Range[5,100000,4],PrimeQ]; (* se=A002144 *)
    se2=Select[se,MemberQ[se,(#-1)/4]&]
    (* (se2-1)/4 = intersection (A005098, A002144) *)

A227541 a(n) = floor(13*n^2/4).

Original entry on oeis.org

0, 3, 13, 29, 52, 81, 117, 159, 208, 263, 325, 393, 468, 549, 637, 731, 832, 939, 1053, 1173, 1300, 1433, 1573, 1719, 1872, 2031, 2197, 2369, 2548, 2733, 2925, 3123, 3328, 3539, 3757, 3981, 4212, 4449, 4693, 4943, 5200, 5463, 5733, 6009
Offset: 0

Views

Author

Wolfdieter Lang, Aug 07 2013

Keywords

Comments

This generalizes A032527, which uses 5, to 13 (the next prime 1 (mod 4)). The figures in A032527 use n/2 concentric dotted pentagons for even n, and (n-1)/2 concentric dotted pentagons plus an extra dot in the middle if n is odd. In the present case one can take n/2 concentric dotted 13-gons (the dot numbers of each side for these 13-gons are 2, 4, 6, ..., n) for even n>=2. There is no figure for n = 0. For odd n one has (n-1)/2 concentric dotted 13-gons (the dot numbers of each side for these 13-gons are 3, 5, 7, ..., n) and an extra dotted 3-gon in the middle. See the example section below for the counting.
a(n) = -N(-floor(n/2),n) with the N(a,b) = ((2*a+b)^2 - b^2*13)/4, the norm for integers a + b*omega(13), a, b rational integers, in the quadratic number field Q(sqrt(13)), where omega(13) = (1 + sqrt(13))/2.
a(n) = max({|N(a,n)|,a = -n..+n}) = |N(-floor(n/2),n)| = 3*n^2 + n*floor(n/2) - floor(n/2)^2 = floor(13*n^2/4) (the last eq. checks for even and odd n).
In the general case one has for primes 1 (mod 4), p(k) = A002144(k), k >= 1, a(p(k);n) = floor(p(k)*n^2/4) with o.g.f. G(p(k);x) = x*(A(k)*(1+x^2) + B(k)*x)/((1-x)^3*(1+x)), where A(k) = A005098(k) = (p(k)-1)/4 and B(k) = A119681(k) = (p(k)+1)/2. This follows from the alternative formula a(p(k),n) = p(k)*n^2/4 + ((-1)^n-1)/8, n >= 0 (which checks for even and odd n). Because the denominator of the o.g.f. is 1-2*x+2*x^3-x^4 the recurrence given by Bruno Berselli below holds for all a(k;n) sequences with inputs for n = -1, 0, 1, 2 given by (p(k)-1)/4, 0, (p(k)-1)/4, p(k), respectively.
The dot counting in the concentric p(k)-gons is similar to the one described for p = 5 in A032527 and for p=13 here. For odd n one puts an additional dotted A(k)-gon into the center. - Wolfdieter Lang, Aug 08 2013

Examples

			Counting dots in the concentric dotted 13-gons described above in a comment:
a(2*k), k >= 1: (2-1)*13 = 13, (1+(4-1))*13 = 52, (1+3+(6-1))*13 = 117, (1+3+5+7)*13 = 208, ... a(2*k+1), k >= 0: 3, 3+(3-1)*13 = 29, 3+(2+(5-1))*13 = 81, 3+2*(1+2+3)*13 = 159, ... (a dotted triangle is put into the middle of the k concentric 13-gons).
		

Crossrefs

Cf. A032527 (case for prime 5).

Programs

Formula

a(n) = 13*n^2/4+((-1)^n-1)/8, n >= 0 (use even or odd n to prove it).
G.f.: x*(3+7*x+3*x^2)/((1-x)^3*(1+x)).
a(2*k) = k^2*13, k >= 0.
a(2*k+1) = 3 + k*(k+1)*13, k >= 0.
a(n) = a(-n) = 2*a(n-1) - 2*a(n-3) + a(n-4). - Bruno Berselli, Aug 08 2013
a(n) = Sum_{j=1..n} Sum_{i=1..n} ceiling((i+j-n+5)/2). - Wesley Ivan Hurt, Mar 12 2015
Sum_{n>=1} 1/a(n) = Pi^2/78 + tan(Pi/(2*sqrt(13)))*Pi/sqrt(13). - Amiram Eldar, Jul 30 2024

A320599 Numbers k such that 4k + 1 and 8k + 1 are both primes.

Original entry on oeis.org

9, 24, 39, 57, 84, 144, 150, 165, 207, 219, 234, 249, 252, 267, 309, 324, 357, 402, 414, 507, 522, 534, 555, 570, 639, 654, 759, 765, 777, 792, 795, 882, 924, 927, 942, 969, 1044, 1065, 1089, 1155, 1200, 1215, 1227, 1389, 1395, 1437, 1509, 1530, 1554, 1557
Offset: 1

Views

Author

Amiram Eldar, Nov 20 2018

Keywords

Comments

Rotkiewicz proved that if k is in this sequence then (4k + 1)*(8k + 1) is a triangular Fermat pseudoprime to base 2 (A293622), and thus under Schinzel's Hypothesis H there are infinitely many triangular Fermat pseudoprimes to base 2.
The corresponding pseudoprimes are 2701, 18721, 49141, 104653, 226801, 665281, 721801, ...

Examples

			9 is in the sequence since 4*9 + 1 = 37 and 8*9 + 1 = 73 are both primes.
		

Crossrefs

Intersection of A005098 and A005123.

Programs

  • Mathematica
    Select[Range[1000], PrimeQ[4#+1] && PrimeQ[8#+1] &]
  • PARI
    isok(n) = isprime(4*n+1) && isprime(8*n+1); \\ Michel Marcus, Nov 20 2018
    
  • Python
    from sympy import isprime
    def ok(n): return isprime(4*n + 1) and isprime(8*n + 1)
    print(list(filter(ok, range(1558)))) # Michael S. Branicky, Sep 24 2021

A199427 Numbers n such that 4n+1 and 8n+3 are prime.

Original entry on oeis.org

1, 7, 10, 13, 22, 28, 43, 58, 70, 73, 127, 148, 160, 163, 190, 202, 238, 253, 262, 307, 322, 352, 370, 400, 433, 472, 475, 493, 517, 532, 535, 568, 598, 637, 673, 685, 688, 742, 832, 847, 853, 862, 898, 940, 955, 1018, 1087, 1093, 1102, 1120, 1183, 1198, 1270
Offset: 1

Views

Author

Martin Renner, Nov 06 2011

Keywords

Comments

According to Beiler: the integer 2 is a primitive root of all primes of the form 8n+3 provided 4n+1 is a prime.

Examples

			For n = 1, both 11 and 5 are primes, hence 2 is a primitive root of 11.
		

References

  • Albert H. Beiler: Recreations in the theory of numbers. New York: Dover, (2nd ed.) 1966, p. 102, nr. 4.

Crossrefs

Programs

  • Mathematica
    Select[Range[1270], PrimeQ[4*# + 1] && PrimeQ[8*# + 3] &] (* T. D. Noe, Nov 07 2011 *)

Formula

a(n) = intersection(A005098, A005124).

A254010 Numbers k such that 4k+1 and 4(k+1)+1 are primes.

Original entry on oeis.org

3, 9, 24, 27, 48, 57, 69, 78, 87, 99, 114, 153, 168, 189, 192, 213, 219, 234, 252, 273, 303, 324, 357, 372, 387, 399, 402, 423, 468, 498, 534, 567, 573, 594, 597, 609, 618, 654, 672, 687, 699, 708, 714, 738, 759, 804, 813, 864, 882, 903, 918, 924, 948, 969, 1032, 1038, 1128, 1182, 1197, 1203, 1233, 1242, 1269, 1308, 1353
Offset: 1

Views

Author

Zak Seidov, Jan 22 2015

Keywords

Comments

Both k and k+1 are terms in A005098. All terms are multiples of 3.
4k+1 and 4(k+1)+1 are pairs of consecutive primes. Notice that in all cases, the numbers 4(k-1)+1 and 4(k+2)+1 are not prime as they are multiples of 3.

Crossrefs

Cf. A005098.

Programs

  • Magma
    [n: n in [0..1000] | IsPrime(4*n+1) and IsPrime(4*(n+1)+1)]; // Vincenzo Librandi, Apr 24 2015
  • Maple
    A254010:=n->`if`(isprime(4*n+1) and isprime(4*(n+1)+1), n, NULL): seq(A254010(n), n=1..2000); # Wesley Ivan Hurt, Apr 23 2015
  • Mathematica
    Select[Range[1000], PrimeQ[4 # + 1] && PrimeQ[4 (# + 1) + 1] &] (* Vincenzo Librandi, Apr 24 2015 *)

A254288 Numbers k such that 4*k + {1, 3, 7, 9, 13, 19} are all prime.

Original entry on oeis.org

1, 370, 41425, 81535, 255625, 267175, 311590, 365350, 1054570, 1381750, 2533600, 2975125, 3266080, 3930205, 4684210, 4782385, 4802860, 5940850, 6414610, 7986565, 8429245, 8570470, 8636305, 8810080, 9270715, 9857980, 10459525, 13708225, 13917490, 15127720, 15252460
Offset: 1

Views

Author

K. D. Bajpai, Jan 27 2015

Keywords

Comments

All terms in this sequence are congruent to 1 mod 3.
Subsequence of A123986.

Examples

			a(2) = 370;
4*370 +  1 = 1481;
4*370 +  3 = 1483;
4*370 +  7 = 1487;
4*370 +  9 = 1489;
4*370 + 13 = 1493;
4*370 + 19 = 1499;
All six are prime.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..10^8] | forall{4*n+i: i in [1, 3, 7, 9, 13, 19] |  IsPrime(4*n+i)}]; // Vincenzo Librandi, Mar 12 2015
  • Mathematica
    Select[Range[5*10^7], PrimeQ[4*# + 1] && PrimeQ[4*# + 3] && PrimeQ[4*# + 7] && PrimeQ[4*# + 9] && PrimeQ[4*# + 13] && PrimeQ[4*# + 19] &]
    Select[Range[5*10^6], And @@ PrimeQ /@ ({1, 3, 7, 9, 13, 19} + 4 #) &]
  • PARI
    for(n=1,10^7, if( isprime(4*n + 1) && isprime(4*n + 3) &&isprime(4*n + 7) &&isprime(4*n + 9) &&isprime(4*n + 13) &&isprime(4*n + 19) , print1(n,", ")))
    

A254376 Numbers n such that 4n+1, 4n+3, 4n+7, 4n+9 and 4n+13 are prime.

Original entry on oeis.org

1, 25, 370, 4015, 4855, 10945, 36040, 41425, 41710, 50455, 56335, 61900, 81535, 86995, 116290, 129700, 134110, 158365, 207430, 239635, 255625, 265990, 267175, 272815, 293395, 311590, 335080, 337810, 339700, 342115, 365350, 393385, 403960, 481345, 488590, 550990
Offset: 1

Views

Author

K. D. Bajpai, Jan 29 2015

Keywords

Comments

All terms in this sequence are 1 mod 3.
Each term yields a set of five consecutive primes.
Alternatively: Numbers n such that 4n+k forms a set of five consecutive primes for k = {1,3,7,9,13}.
Subsequence of A123986.

Examples

			25 is in the list because 4*25 + 1 = 101, 4*25 + 3 = 103, 4*25 + 7 = 107, 4*25 + 9 = 109 and 4*25 + 13 = 113 are all prime.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..10^6] | forall{4*n+r: r in [1,3,7,9,13] | IsPrime(4*n+r)}]; // Vincenzo Librandi, Feb 16 2015
  • Mathematica
    Select[Range[1, 500000], PrimeQ[4*# + 1] && PrimeQ[4*# + 3] && PrimeQ[4*# + 7] && PrimeQ[4*# + 9] && PrimeQ[4*# + 13] &]
    Select[Range[5*10^6], And @@ PrimeQ /@ ({1, 3, 7, 9, 13} + 4 #) &]
  • PARI
    for(n=1,10^7, if( isprime(4*n + 1) && isprime(4*n + 3) &&isprime(4*n + 7) &&isprime(4*n + 9) &&isprime(4*n + 13), print1(n,", ")))
    

A260821 Least positive integer k for which n*2^(2^k) + 1 is composite.

Original entry on oeis.org

5, 1, 2, 2, 1, 1, 3, 1, 2, 2, 1, 1, 2, 1, 3, 1, 1, 2, 1, 1, 1, 3, 1, 2, 3, 1, 3, 3, 1, 1, 1, 1, 1, 2, 1, 1, 5, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 4, 2, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 3, 2, 1, 1, 1, 1, 2, 1, 1, 2
Offset: 1

Views

Author

Marco RipĂ , Jul 31 2015

Keywords

Comments

a(n) = 1 for nonzero n in A045751. - Michel Marcus, Aug 01 2015

Examples

			a(7)=3 because 7*2^2 + 1 = 29 is prime and 7*2^(2^2) + 1 = 113 is also prime, while 7*2^(2^3) + 1 = 11*163.
		

Crossrefs

Programs

  • Mathematica
    A260821[n_] := Module[{k = 0}, While[PrimeQ[n*2^(2^++k) + 1]]; k];
    Array[A260821, 100] (* Paolo Xausa, Jan 31 2024 *)
  • PARI
    a(n) = {k = 1; while (isprime(n*2^2^k+1), k++); k;} \\ Michel Marcus, Aug 01 2015

Extensions

More terms from Michel Marcus, Aug 01 2015

A333721 Numbers k such that k + 1, 2k + 1, 3k + 1, 4k + 1, and 6k + 1 are all prime.

Original entry on oeis.org

1530, 4260, 25410, 26040, 78540, 111720, 174990, 211050, 214830, 395430, 403260, 409290, 459690, 487830, 512820, 711120, 779790, 910560, 1023750, 1135950, 1280370, 1312350, 1451520, 1464810, 1487070, 1563510, 1623360, 1698060, 1824330, 1933680, 2006340, 2097480
Offset: 1

Views

Author

Pedro Caceres, May 04 2020

Keywords

Comments

All terms are multiples of 6.
All terms are multiples of 30. - Robert Israel, Jun 17 2020

Examples

			25410 is in the sequence because 25411, 50821, 76231, 101641, 152461 are all prime.
		

Crossrefs

Programs

  • Maple
    select(t -> andmap(isprime, [t+1,2*t+1,3*t+1,4*t+1,6*t+1]), [seq(i,i=30..3*10^6,30)]); # Robert Israel, Jun 17 2020
  • PARI
    isok(m)={for(i=1, 6, if(i<>5&&!isprime(i*m+1), return(0))); 1}
    { forstep(n=0, 3*10^6, 6, if(isok(n), print1(n, ", "))) } \\ Andrew Howroyd, May 04 2020
Previous Showing 31-39 of 39 results.