A265398 Perform one x^2 -> x+1 reduction for the polynomial with nonnegative integer coefficients that is encoded in the prime factorization of n.
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
Links
- Antti Karttunen, Table of n, a(n) for n = 1..10080
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
Extensions
Keyword mult added by Antti Karttunen, Aug 04 2018
Comments