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 21-27 of 27 results.

A224467 Numbers n such that 27*n+1 is prime.

Original entry on oeis.org

4, 6, 10, 14, 16, 18, 20, 28, 30, 34, 48, 54, 58, 60, 66, 74, 76, 80, 84, 88, 94, 96, 98, 108, 110, 114, 118, 128, 130, 136, 138, 144, 146, 150, 154, 166, 170, 180, 184, 186, 188, 198, 206, 214, 230, 236, 238, 240, 258, 264, 268, 278, 280, 284, 286, 296, 300
Offset: 1

Views

Author

K. D. Bajpai, Jul 20 2013

Keywords

Examples

			27*6 + 1 = 163 which is prime. Hence 6 is in the sequence.
		

Crossrefs

Programs

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

A123978 Numbers k for which 8*k+1, 8*k+3 and 8*k+7 are primes.

Original entry on oeis.org

2, 5, 80, 107, 110, 185, 260, 332, 500, 1067, 1307, 1472, 1625, 1760, 1790, 1955, 2255, 2612, 2627, 2672, 2882, 2945, 3197, 3335, 3467, 3965, 4007, 4037, 4040, 4202, 4355, 4880, 5147, 5252, 5525, 6242, 6812, 6917, 6977, 7430, 7787, 8192, 8612, 8657, 8720
Offset: 1

Views

Author

Artur Jasinski, Oct 30 2006

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[10^4], And @@ PrimeQ /@ ({1, 3, 7} + 8#) &] (* Ray Chandler, Nov 05 2006 *)

Extensions

Extended by Ray Chandler, Nov 05 2006

A123980 Numbers k for which 8*k+1, 8*k+5 and 8*k+7 are primes.

Original entry on oeis.org

12, 24, 57, 162, 234, 249, 267, 297, 432, 519, 564, 717, 969, 984, 1167, 1179, 1389, 1734, 2007, 2364, 2427, 2544, 2664, 2769, 2784, 3582, 3627, 3819, 3897, 4089, 4287, 5244, 5307, 5337, 5472, 5577, 5667, 5727, 5967, 6084, 6102, 6399, 6522, 6822, 6987
Offset: 1

Views

Author

Artur Jasinski, Oct 30 2006

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[7000], And @@ PrimeQ /@ ({1, 5, 7} + 8#) &] (* Ray Chandler, Nov 05 2006 *)

Extensions

Extended by Ray Chandler, Nov 05 2006

A123983 Numbers k for which 8*k+1, 8*k+5, 8*k+7 and 8*k+11 are primes.

Original entry on oeis.org

12, 57, 162, 249, 432, 564, 984, 1734, 2007, 2427, 2664, 2784, 3627, 5307, 5472, 5727, 6399, 7614, 11082, 11547, 11607, 11694, 14127, 14274, 14484, 14862, 15117, 17049, 19104, 19422, 20577, 25677, 27612, 27714, 28152, 29307, 32232, 34602, 35592
Offset: 1

Views

Author

Artur Jasinski, Oct 30 2006

Keywords

Crossrefs

Programs

  • Maple
    isA123983 := proc(n) RETURN( isprime(8*n+1) and isprime(8*n+5) and isprime(8*n+7) and isprime(8*n+11) ) ; end: for n from 1 to 7000 do if isA123983(n) then printf("%d,",n) ; fi ; od ; # R. J. Mathar, Nov 06 2006
  • Mathematica
    Select[Range[37000], And @@ PrimeQ /@ ({1, 5, 7, 11} + 8#) &] (* Ray Chandler, Nov 05 2006 *)

Extensions

Edited and extended by Ray Chandler and R. J. Mathar, Nov 05 2006

A365958 Least k such that 8*n*k+1 is a prime.

Original entry on oeis.org

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

Views

Author

Robert Price, Dec 17 2023

Keywords

Crossrefs

A070852 lists the corresponding primes.

Programs

  • Mathematica
    A365958 = {};
    Do[k=1; While[!PrimeQ[8 n k+1], k++]; AppendTo[A365958 ,k], {n,85}];
    A365958
  • PARI
    a(n) = my(k=1); while (!isprime(8*n*k+1), k++); k; \\ Michel Marcus, Dec 17 2023

A329269 Integers k such that 8*k + 1 is a prime or a square.

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 9, 10, 11, 12, 14, 15, 17, 21, 24, 28, 29, 30, 32, 35, 36, 39, 42, 44, 45, 50, 51, 54, 55, 56, 57, 65, 66, 71, 72, 74, 75, 77, 78, 80, 84, 91, 95, 96, 101, 105, 107, 110, 116, 117, 119, 120, 122, 126, 129, 131, 136, 137, 141, 144, 149, 150
Offset: 1

Views

Author

Frank Ellermann, Feb 23 2020

Keywords

Comments

All odd squares have the form 8*n + 1.

Examples

			8*0 + 1 =  1 = 1^2, so 0 is a term;
8*1 + 1 =  9 = 3^2, so 1 is a term;
8*2 + 1 = 17 = prime(7), so 2 is a term;
8*3 + 1 = 25 = 5^2, so 3 is a term;
8*4 + 1 = 33 is neither prime nor square, so 4 is not a term;
8*5 + 1 = 41 = prime(13), so 5 is a term.
		

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, theorem 14 and ch. 4.5

Crossrefs

Union of the triangular numbers A000217 and A005123.
Cf. A000040, A016754 (odd squares).

Programs

  • Maple
    q:= k-> (t-> isprime(t) or issqr(t))(8*k+1):
    select(q, [$0..200])[];  # Alois P. Heinz, Feb 25 2020
  • Mathematica
    Select[Range[0, 150], PrimeQ[(m = 8*# + 1)] || IntegerQ @ Sqrt[m] &] (* Amiram Eldar, Feb 29 2020 *)
  • PARI
    isok(k) = my(x=8*k+1); isprime(x) || issquare(x); \\ Michel Marcus, Feb 27 2020
  • Rexx
    S = 0 ;  U = 1 ;  P = 1
    do N = 1 while length( S ) < 256
       C = 8 * N + 1
       do I = U by 2
          K = I * I      ;  if K > C then  leave I
          U = I          ;  if K < C then  iterate I
          S = S || ',' N ;  iterate N
       end I
       do I = P
          K = PRIME( I ) ;  if K > C then  leave I
          P = I          ;  if K < C then  iterate I
          S = S || ',' N ;  iterate N
       end I
    end N
    say S ;  return S
    
Previous Showing 21-27 of 27 results.