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.

A385326 The number of positive k <= 2*n + 1 such that 2*n + 1 divides (2^k + 2*n + 1)^2 - 1.

Original entry on oeis.org

1, 3, 2, 2, 3, 2, 2, 7, 4, 2, 7, 2, 2, 3, 2, 6, 6, 5, 2, 6, 4, 6, 7, 2, 2, 12, 2, 5, 6, 2, 2, 21, 10, 2, 6, 2, 8, 7, 5, 2, 3, 2, 21, 6, 8, 15, 18, 5, 4, 6, 2, 2, 17, 2, 6, 6, 8, 5, 19, 9, 2, 12, 2, 18, 18, 2, 14, 7, 4, 2, 6, 4, 10, 7, 2, 10, 12, 15, 6, 6, 4, 2, 16, 2, 2, 19, 2, 5, 6, 2, 2, 6, 10, 9, 21, 2, 4, 32, 2, 2, 6
Offset: 0

Views

Author

Juri-Stepan Gerasimov, Jun 25 2025

Keywords

Examples

			1 is the term because 2*0 + 1 = 1 is divisor of (2^1 + 2*0 + 1)^2 - 1 = 3^2 - 1 = 8.
		

Crossrefs

Cf. A003462 (numbers m > 0 such that a(m) = 3), A005384 (primes p such that a(p) = 2), A005408 (odd numbers), A076481 (primes q such that a(q) = 3), A081858 (numbers k numbers k >= 0 such that 2k + 1 divides 2^k - 1), A102781 (numbers k such that 2k + 1 divides (2^k + 2*k + 1)^2 - 1), A224486 (numbers k such that 2k + 1 divides 2^k + 1).

Programs

  • Magma
    [#[k: k in [1..2*n+1] | ((2^k+2*n+1)^2 - 1) mod (2*n + 1) eq 0]: n in [0..100]];
    
  • Mathematica
    a[n_]:=Length[Select[Range[2n+1],Divisible[(2^#+2n+1)^2-1,2n+1] &]]; Array[a,101,0] (* Stefano Spezia, Jun 25 2025 *)
  • PARI
    a(n) = sum(k=1, 2*n+1, !Mod((2^k + 2*n + 1)^2 - 1, 2*n + 1)); \\ Michel Marcus, Jun 25 2025