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.
%I A056458 #30 Feb 18 2025 18:50:12 %S A056458 2,0,2,2,6,4,14,12,28,24,62,54,126,112,246,240,510,476,1022,990,2030, %T A056458 1984,4094,4020,8184,8064,16352,16254,32766,32484,65534,65280,131006, %U A056458 130560,262122,261576,524286,523264,1048446,1047540,2097150,2094988,4194302,4192254 %N A056458 Number of primitive (aperiodic) palindromes using a maximum of two different symbols. %H A056458 Robert Israel, <a href="/A056458/b056458.txt">Table of n, a(n) for n = 1..6610</a> %H A056458 M. R. Nester, <a href="https://doi.org/10.14264/3992bc0">Mathematical investigations of some plant interaction designs</a>, PhD Thesis, (1999), University of Queensland, Brisbane, Australia. [See A056391 for pdf file of Chap. 2] %F A056458 a(n) = Sum_{d|n} mu(d)*A016116(1 + n/d). %F A056458 a(n) = 2 * A056476(n). - _Alois P. Heinz_, Feb 18 2025 %p A056458 f:= proc(n) local d; add(numtheory:-mobius(d)*2^floor((1+n/d)/2), d = numtheory:-divisors(n)) end proc: %p A056458 map(f, [$1..50]); # _Robert Israel_, Feb 18 2025 %o A056458 (PARI) a(n) = sumdiv(n, d, moebius(d)*2^((1 + n/d)\2)); \\ _Michel Marcus_, Apr 24 2020 %o A056458 (Python) %o A056458 from sympy import mobius, divisors %o A056458 def A056458(n): return sum(mobius(n//d)<<(1+d>>1) for d in divisors(n, generator=True)) # _Chai Wah Wu_, Feb 18 2024 %Y A056458 Cf. A016116, A056476. %Y A056458 Column 2 of A284823. %K A056458 nonn %O A056458 1,1 %A A056458 _Marks R. Nester_ %E A056458 More terms from _Michel Marcus_, Apr 24 2020