A326419 a(n) is the number of distinct Horadam sequences of period n.
1, 1, 3, 5, 10, 11, 21, 22, 33, 34, 55, 46, 78, 69, 92, 92, 136, 105, 171, 140, 186, 175, 253, 188, 290, 246, 315, 282, 406, 284, 465, 376, 470, 424, 564, 426, 666, 531, 660, 568, 820, 570, 903, 710, 852, 781, 1081, 760, 1155, 890, 1136, 996, 1378, 963, 1420, 1140
Offset: 1
Keywords
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
- Ovidiu D. Bagdasar and Peter J. Larcombe, On the Number of Complex Horadam Sequences with a Fixed Period, Fib. Q. 51(4), 2013, 339-347.
Crossrefs
Cf. A102309.
Programs
-
Maple
N:= 200: # for a(1)..a(N) V:= Vector(N,n -> numtheory:-phi(n)*(numtheory:-phi(n)-1)/2): for k1 from 1 to N do p1:= numtheory:-phi(k1); for k2 from k1+1 to N do n:= ilcm(k1,k2); if n <= N then V[n]:= V[n] + p1*numtheory:-phi(k2) fi; od: od: V[1]:= 1: convert(V,list); # Robert Israel, Dec 06 2020
-
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)))));
-
Python
from math import comb from sympy import mobius, divisors 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
Formula
a(n) = Sum_{k1= 2. See link.