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.

A328618 Multiplicative with a(p^e) = p^e if p = 2 or e is a multiple of p, otherwise a(p^e) = p^((p*floor(e/p)) + (2e mod p)).

Original entry on oeis.org

1, 2, 9, 4, 25, 18, 49, 8, 3, 50, 121, 36, 169, 98, 225, 16, 289, 6, 361, 100, 441, 242, 529, 72, 625, 338, 27, 196, 841, 450, 961, 32, 1089, 578, 1225, 12, 1369, 722, 1521, 200, 1681, 882, 1849, 484, 75, 1058, 2209, 144, 2401, 1250, 2601, 676, 2809, 54, 3025, 392, 3249, 1682, 3481, 900, 3721, 1922, 147, 64, 4225, 2178, 4489, 1156, 4761, 2450, 5041, 24
Offset: 1

Views

Author

Antti Karttunen, Oct 23 2019

Keywords

Crossrefs

Cf. A328619 (inverse permutation).

Programs

  • Mathematica
    a[n_] := Product[{p, e} = pe; If[p == 2 || Divisible[e, p], p^e, p^((p*Floor[e/p]) + Mod[2e, p])], {pe, FactorInteger[n]}];
    Array[a, 100] (* Jean-François Alcover, Nov 21 2021 *)
  • PARI
    A328618(n) = { my(f = factor(n), m, q); for(k=1, #f~, q = (f[k, 2]\f[k, 1]); m = (f[k, 2]%f[k, 1]); if(m&&(f[k,1]!=2), f[k, 2] = q*f[k, 1] + ((2*f[k, 2])%f[k, 1]))); factorback(f); };

Formula

For all n >= 0, A276085(a(A276086(n))) = A328622(n).