|
|
A326419
|
|
a(n) is the number of distinct Horadam sequences of period n.
|
|
3
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
LINKS
|
|
|
FORMULA
|
a(n) = Sum_{k1<k2, lcm(k1, k2)=n} phi(k1)*phi(k2) + phi(n)*(phi(n)-1)/2, for n>= 2. See link.
|
|
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:
|
|
PROG
|
(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)))));
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|