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

A383473 Integers k such that d*2^k + 1 is prime for some divisor of k.

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 14, 15, 16, 18, 25, 30, 36, 51, 55, 63, 66, 69, 75, 81, 85, 134, 141, 162, 189, 201, 209, 220, 245, 276, 324, 408, 438, 446, 456, 534, 616, 675, 693, 726, 892, 900, 1305, 1326, 1494, 1824, 2208, 2394, 2766, 2826, 3024, 3168, 3189, 3690, 3703, 3880, 3912, 3927, 4410, 4543, 4713
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 27 2025

Keywords

Examples

			6 is in the sequence a term because 3*2^6 + 1 = 193 prime for divisor 3 of k = 6.
		

Crossrefs

Supersequence of A005849.

Programs

  • Magma
    [k: k in [1..900] | not #[d: d in Divisors(k) | IsPrime(d*2^k+1)] eq 0];
    
  • Mathematica
    q[k_] := AnyTrue[Divisors[k], PrimeQ[# * 2^k +1] &]; Select[Range[4000], q] (* Amiram Eldar, Apr 28 2025 *)
  • PARI
    isok(k) = fordiv(k, d, if (ispseudoprime(d*2^k+1), return(1))); return(0); \\ Michel Marcus, Apr 28 2025

A383475 Numbers k such that k*2^d is the average of a twin prime pair for some divisor d of k.

Original entry on oeis.org

2, 3, 6, 9, 12, 15, 18, 21, 24, 30, 36, 39, 42, 45, 48, 51, 54, 60, 69, 72, 75, 78, 81, 90, 96, 99, 105, 108, 114, 120, 129, 132, 135, 141, 144, 150, 156, 165, 168, 174, 180, 186, 192, 201, 210, 216, 228, 231, 234, 240, 252, 258, 261, 264, 270, 282, 285, 288, 300
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 27 2025

Keywords

Examples

			2 is a term in the sequence because 2*2^1 = 4 is the average of twin primes 3 and 5 for divisor d = 1 of k = 2.
		

Crossrefs

Supersequence of 3*A002822 and 3*A060212.

Programs

  • Magma
    [k: k in [1..300] | not #[d: d in Divisors(k) | IsPrime(k*2^d-1) and IsPrime(k*2^d+1)] eq 0];
    
  • Mathematica
    q[k_] := AnyTrue[Divisors[k], And @@ PrimeQ[k * 2^# + {-1, 1}] &]; Select[Range[300], q] (* Amiram Eldar, Apr 28 2025 *)
  • PARI
    isok(k) = fordiv(k, d, if (isprime(k*2^d-1) && isprime(k*2^d+1), return(1))); return(0); \\ Michel Marcus, Apr 28 2025

A383043 Integers k such that d*2^k - 1 is prime for some proper divisor d of k.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 10, 12, 13, 16, 17, 18, 19, 21, 28, 30, 31, 36, 42, 46, 54, 60, 61, 63, 75, 88, 89, 99, 102, 104, 106, 107, 108, 126, 127, 132, 133, 204, 214, 216, 225, 264, 270, 286, 304, 306, 324, 330, 342, 352, 390, 414, 420, 456, 462, 468
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 19 2025

Keywords

Examples

			81 is not in the sequence because 1*2^81 - 1, 3*2^81 - 1, 9*2^81 - 1 and 27*81 - 1 are composites where 1, 3, 9 and 27 are proper divisors d of k = 81, while 81*2^81 - 1 is prime where 81 is nonproper divisor d of k = 81.
		

Crossrefs

Supersequence of A000043. Subsequence of A382811.

Programs

  • Magma
    [k: k in [1..500] | not #[d: d in [1..k-1] | k mod d eq 0 and IsPrime(d*2^k-1)] eq 0];
    
  • Mathematica
    s={};Do[d=Drop[Divisors[n],-1];If[ContainsAny[PrimeQ[d*2^n-1],{True}],AppendTo[s,n]],{n,468}];s (* James C. McMahon, May 01 2025 *)
  • PARI
    isok(k) = fordiv(k, d, if ((dMichel Marcus, Apr 20 2025
Showing 1-3 of 3 results.