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 A326419 #35 May 10 2025 02:37:25 %S A326419 1,1,3,5,10,11,21,22,33,34,55,46,78,69,92,92,136,105,171,140,186,175, %T A326419 253,188,290,246,315,282,406,284,465,376,470,424,564,426,666,531,660, %U A326419 568,820,570,903,710,852,781,1081,760,1155,890,1136,996,1378,963,1420,1140 %N A326419 a(n) is the number of distinct Horadam sequences of period n. %H A326419 Robert Israel, <a href="/A326419/b326419.txt">Table of n, a(n) for n = 1..10000</a> %H A326419 Ovidiu D. Bagdasar and Peter J. Larcombe, <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/Papers1/51-4/BagdasarLarcombe.pdf">On the Number of Complex Horadam Sequences with a Fixed Period</a>, Fib. Q. 51(4), 2013, 339-347. %F A326419 a(n) = Sum_{k1<k2, lcm(k1, k2)=n} phi(k1)*phi(k2) + phi(n)*(phi(n)-1)/2, for n>= 2. See link. %p A326419 N:= 200: # for a(1)..a(N) %p A326419 V:= Vector(N,n -> numtheory:-phi(n)*(numtheory:-phi(n)-1)/2): %p A326419 for k1 from 1 to N do %p A326419 p1:= numtheory:-phi(k1); %p A326419 for k2 from k1+1 to N do %p A326419 n:= ilcm(k1,k2); %p A326419 if n <= N then V[n]:= V[n] + p1*numtheory:-phi(k2) fi; %p A326419 od: %p A326419 od: %p A326419 V[1]:= 1: %p A326419 convert(V,list); # _Robert Israel_, Dec 06 2020 %o A326419 (PARI) a(n) = if (n==1, 1, eulerphi(n)*(eulerphi(n)-1)/2 + sum(k2=1, n, sum(k1=1, k2-1, if (lcm(k1, k2)==n, eulerphi(k1)*eulerphi(k2))))); %o A326419 (Python) %o A326419 from math import comb %o A326419 from sympy import mobius, divisors %o A326419 def A326419(n): return sum(mobius(d)*comb(n//d,2) for d in divisors(n,generator=True)) if n>1 else 1 # _Chai Wah Wu_, May 09 2025 %Y A326419 Cf. A102309. %K A326419 nonn %O A326419 1,3 %A A326419 _Michel Marcus_, Sep 30 2019