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.

A332792 a(1) = 1; a(n) = Sum_{d|n, d < n} phi(d) * a(d).

Original entry on oeis.org

1, 1, 1, 2, 1, 4, 1, 6, 3, 6, 1, 16, 1, 8, 7, 30, 1, 30, 1, 34, 9, 12, 1, 104, 5, 14, 21, 60, 1, 96, 1, 270, 13, 18, 11, 278, 1, 20, 15, 330, 1, 174, 1, 136, 81, 24, 1, 1176, 7, 130, 19, 186, 1, 588, 15, 804, 21, 30, 1, 1204, 1, 32, 135, 4590, 17, 402, 1, 310, 25, 348
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 24 2020

Keywords

Crossrefs

Cf. A000010, A006874, A008578 (positions of 1's), A038045, A057660, A332791.

Programs

  • Mathematica
    a[1] = 1; a[n_] := Sum[If[d < n, EulerPhi[d] a[d], 0], {d, Divisors[n]}]; Table[a[n], {n, 1, 70}]
    a[1] = 1; a[n_] := a[n] = Sum[If[GCD[n, k] > 1, a[n/GCD[n, k]], 0], {k, 1, n}]; Table[a[n], {n, 1, 70}]
  • PARI
    up_to = 20000;
    A332792list(n) = { my(v=vector(n)); v[1] = 1; for(n=2, #v, v[n] = sumdiv(n, d, if(d==n, 0, v[d]*eulerphi(d)))); (v); };
    v332792 = A332792list(up_to);
    A332792(n) = v332792[n]; \\ Antti Karttunen, Jan 22 2025

Formula

a(1) = 1; a(n) = Sum_{k=1..n, gcd(n, k) > 1} a(n/gcd(n, k)).