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.

A326419 a(n) is the number of distinct Horadam sequences of period n.

Original entry on oeis.org

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

Views

Author

Michel Marcus, Sep 30 2019

Keywords

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.