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.

A217465 Composite integers k such that 2^k == 2 (mod k*(k+1)).

Original entry on oeis.org

561, 1905, 4033, 4681, 5461, 6601, 8481, 11305, 13741, 13981, 16705, 23377, 30121, 31417, 41041, 49141, 52633, 57421, 88357, 88561, 101101, 107185, 121465, 130561, 162193, 196021, 196093, 204001, 208465, 219781, 266305, 276013, 278545, 282133, 285541, 314821, 334153, 341497, 390937, 399001
Offset: 1

Views

Author

V. Raman, Oct 04 2012

Keywords

Comments

Terms A019320(k) belongs to this sequence for k in A297415. - Max Alekseyev, Dec 29 2017

Crossrefs

Subsequence of A216822.
Contains A303531 as a subsequence.

Programs

  • Mathematica
    Select[Range[400000],!PrimeQ[#]&&PowerMod[2,#,#(#+1)]==2&] (* Harvey P. Dale, Oct 12 2012 *)
  • PARI
    for(n=1,10000,if((2^n)%(n*(n+1))==2&&isprime(n)==0,printf(n",")))
    
  • PARI
    forcomposite(n=4,10^6, if(Mod(2,n*(n+1))^n==2, print1(n", "))) \\ Charles R Greathouse IV, Aug 29 2024
    
  • Python
    from sympy import isprime
    A217465_list = [n for n in range(1,10**6) if pow(2,n,n*(n+1)) == 2 and not isprime(n)] # Chai Wah Wu, Mar 25 2021

A298758 Numbers k such that both k and 2k-1 are Poulet numbers (Fermat pseudoprimes to base 2).

Original entry on oeis.org

15709, 65281, 20770621, 104484601, 112037185, 196049701, 425967301, 2593182901, 16923897871, 32548281361, 45812984491, 52035130951, 55897227751, 82907336737, 90003640021, 92010062101, 138016057141, 204082130071, 310026150211, 620006892121, 622333751509
Offset: 1

Views

Author

Amiram Eldar, Jan 26 2018

Keywords

Comments

2*a(n) - 1 = A303531(n) belongs to A217465. - Max Alekseyev, Apr 24 2018
Numbers k such that both k and 2k+1 are Poulet numbers are listed in A303447.
If p is a prime such that 2*p-1 is also a prime (A005382) and k = (2^(2*p-1)+1)/3 and 2*k-1 are both composites, then k is a term of this sequence (Rotkiewicz, 2000). - Amiram Eldar, Nov 09 2023

Crossrefs

Subsequence of A001567.

Programs

  • Mathematica
    s = Import["b001567.txt", "Data"][[All, -1]]; n = Length[s];
    aQ[n_] := ! PrimeQ[n] && PowerMod[2, (n - 1), n] == 1;
    a = {}; Do[p = 2*s[[k]] - 1; If[aQ[p], AppendTo[a, s[[k]]]], {k, 1, n}]; a (* using the b-File from A001567 *)
  • PARI
    isP(n) = (Mod(2, n)^n==2) && !isprime(n) && (n>1);
    isok(n) = isP(n) && isP(2*n-1); \\ Michel Marcus, Mar 09 2018
Showing 1-2 of 2 results.