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.

A265398 Perform one x^2 -> x+1 reduction for the polynomial with nonnegative integer coefficients that is encoded in the prime factorization of n.

Original entry on oeis.org

1, 2, 3, 4, 6, 6, 15, 8, 9, 12, 35, 12, 77, 30, 18, 16, 143, 18, 221, 24, 45, 70, 323, 24, 36, 154, 27, 60, 437, 36, 667, 32, 105, 286, 90, 36, 899, 442, 231, 48, 1147, 90, 1517, 140, 54, 646, 1763, 48, 225, 72, 429, 308, 2021, 54, 210, 120, 663, 874, 2491, 72, 3127, 1334, 135, 64, 462, 210, 3599, 572, 969, 180, 4087, 72
Offset: 1

Views

Author

Antti Karttunen, Dec 15 2015

Keywords

Comments

Completely multiplicative with a(2) = 2, a(3) = 3, a(prime(k)) = prime(k-1) * prime(k-2) for k > 2. - Andrew Howroyd & Antti Karttunen, Aug 04 2018

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = Module[{k, p, e}, Which[n<4, n, PrimeQ[n], k = PrimePi[n]; Prime[k-1] Prime[k-2], True, Product[{p, e} = pe; a[p]^e, {pe, FactorInteger[n]}]]];
    a /@ Range[1, 72] (* Jean-François Alcover, Sep 20 2019 *)
    f[p_, e_] := If[p < 5, p, NextPrime[p,-1]*NextPrime[p,-2]]^e; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Dec 01 2022 *)
  • PARI
    A065330(n) = { while(0 == (n%2), n = n/2); while(0 == (n%3), n = n/3); n; }
    A065331 = n -> n/A065330(n);
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A265398(n) = { my(a); if(1 == n, n, a = A064989(A065330(n)); A064989(a)*a*A065331(n)); };
    
  • PARI
    r(p) = {my(q = precprime(p-1)); q*precprime(q-1)};
    a(n) = {my(f=factor(n)); prod(i=1, #f~, if(f[i,1]<5, f[i,1], r(f[i,1]))^f[i,2])}; \\ Amiram Eldar, Dec 01 2022
    
  • Scheme
    (definec (A265398 n) (if (= 1 n) n (* (A065331 n) (A064989 (A065330 n)) (A064989 (A064989 (A065330 n))))))

Formula

a(1) = 1; for n > 1, a(n) = A064989(A064989(A065330(n))) * A064989(A065330(n)) * A065331(n).
Sum_{k=1..n} a(k) = c * n^3, where c = (1/3) * Product_{p prime} (p^3-p^2)/(p^3-a(p)) = 0.093529982... . - Amiram Eldar, Dec 01 2022

Extensions

Keyword mult added by Antti Karttunen, Aug 04 2018