A321362 a(n) is the least k such that in the prime power factorization of k! the exponents of primes p_1, ..., p_n are odd, while the exponent of p_(n+1) is even.
2, 3, 5, 119, 57, 220, 1131, 2986, 1505, 3211, 21300, 26795, 11820, 14575, 67385, 221051, 33782, 132512, 819236, 1478432, 1630903, 26736550, 1095752, 41815849, 24813938, 31982450, 142574286, 860986855, 602660826, 2638930495, 2664421881, 1309662955, 33767540563
Offset: 1
Keywords
Examples
For k=2, 2!=2 with factorization 2 where the first exponent is odd. For k=3, 3!=6 with factorization 2*3 where the first 2 exponents are odd. For k=5, 5!=120 with factorization 2*3*5 where the first 3 exponents are odd. In each case, there are no lesser numbers with the same property.
Links
- Giovanni Resta, Table of n, a(n) for n = 1..37 (terms < 10^12)
- Rémy Sigrist, C program for A321362
Programs
-
C
See Links section.
-
Mathematica
aQ[k_,n_] := Module[{e=FactorInteger[k!][[;;,2]]}, Length[e]>=n && AllTrue[ e[[1;;n]], OddQ ] && If[Length[e]>n, EvenQ[e[[n+1]]], True]]; a[n_] := Module[ {k=2}, While[!aQ[k,n], k++]; k ]; Array[a,10] (* Amiram Eldar, Nov 07 2018 *)
-
PARI
isok(v, n) = {if (#v < n, return (0)); for (i=1, n, if (!(v[i] % 2), return(0));); (#v == n) || !(v[n+1] % 2);} newv(v, i) = {if (isprime(i), return(concat(v, 1))); f = factor(i); for (k=1, #f~, v[primepi(f[k,1])] += f[k,2];); return (v);} a(n) = {my(v =[1], i = 2); while (!isok(v, n), i++; v = newv(v, i)); i;}
Extensions
a(16)-a(32) from Rémy Sigrist, Nov 08 2018
a(33) from Giovanni Resta, Nov 09 2018
Comments