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

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

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

Original entry on oeis.org

1, 3, 5, 6, 9, 10, 15, 21, 22, 28, 39, 66, 75, 81, 89, 105, 108, 111, 141, 165, 166, 190, 196, 317, 340, 357, 459, 462, 483, 525, 564, 568, 573, 701, 735, 737, 792, 869, 1185, 1311, 1480, 1647, 1794, 1881, 2145, 2405, 2508, 2766, 3081, 3201, 3225, 3243, 4260, 4713, 5369, 5795, 5985
Offset: 1

Views

Author

Juri-Stepan Gerasimov, May 11 2025

Keywords

Examples

			6 is a term because 2*2^6 + 6/2 = 131 is prime for divisor d = 2 of k = 6.
		

Crossrefs

Supersequence of A057663.

Programs

  • Magma
    [k: k in [1..1000] | not #[d: d in Divisors(k) | IsPrime(d*2^k+(k div d))] eq 0];
    
  • Mathematica
    Select[Range[4300],Sum[Boole[PrimeQ[d*2^#+#/d]],{d,Divisors[#]}]>0 &] (* Stefano Spezia, May 16 2025 *)
  • PARI
    is(n, f=factor(n))=fordiv(n>>valuation(n,2),d, if(isprime(n/d*2^n+d), return(1))); 0 \\ Charles R Greathouse IV, May 17 2025

Extensions

a(41) corrected by Sean A. Irvine, May 21 2025
Showing 1-2 of 2 results.