A298155 For any n >= 0 and k > 0, the prime(k)-adic valuation of a(n) equals the prime(k)-adic valuation of n + k (where prime(k) denotes the k-th prime).
1, 6, 5, 28, 3, 2, 11, 4680, 1, 2, 357, 76, 5, 6, 23, 16, 9, 770, 1, 348, 403, 2, 75, 8, 7, 1998, 1, 340, 1353, 86, 19, 672, 235, 26, 9, 4, 1, 36570, 7, 88, 3, 2, 295, 2196, 17, 98, 39, 400, 1943, 114, 11, 8804, 68985, 2, 1, 24, 1, 790, 3, 364, 1909, 3366, 185
Offset: 0
Keywords
Examples
For n = 7: - the 2-adic valuation of 7 + 1 is 3, - the 3-adic valuation of 7 + 2 is 2, - the 5-adic valuation of 7 + 3 is 1, - the 7-adic valuation of 7 + 4 is 0, - the 11-adic valuation of 7 + 5 is 0, - the 13-adic valuation of 7 + 6 is 1, - for k > 6, the prime(k)-adic valuation of 7 + k is 0, - hence a(7) = 2^3 * 3^2 * 5^1 * 13^1 = 4680.
Links
- Rémy Sigrist, Table of n, a(n) for n = 0..10000
Crossrefs
Programs
-
Maple
f:= proc(n) local v, p, k; v:= 1: p:= 1: for k from 1 do p:= nextprime(p); if p > n+k then return v fi; v:= v * p^padic:-ordp(n+k,p) od end proc: map(f, [$0..100]); # Robert Israel, Jan 16 2018
-
Mathematica
f[n_] := Module[{v = 1, p = 1, k}, For[k = 1, True, k++, p = NextPrime[p]; If[p > n + k, Return[v]]; v *= p^IntegerExponent[n + k, p]]]; f /@ Range[0, 100] (* Jean-François Alcover, Jul 30 2020, after Maple *)
-
PARI
a(n) = my (v=1, k=0); forprime(p=1, oo, k++; if (n+k < p, break); v *= p^valuation(n+k,p)); return (v)
Comments