OFFSET
0,4
LINKS
Lorenz Halbeisen and Norbert Hungerbuehler, Number theoretic aspects of a combinatorial function, Notes on Number Theory and Discrete Mathematics 5 (1999), 138-150.
Lorenz Halbeisen, A number-theoretic conjecture and its implication for set theory, Acta Math. Univ. Comenianae 74(2) (2005), 243-254.
OEIS Wiki, Shadow transform.
FORMULA
a(p+1) = (p+1)a(p) where p is prime.
a(n-1) <= a(n) <= n*a(n-1).
EXAMPLE
The sequence (i, j, k) has shadow transform (0, 1, m) where m is the number of even numbers in {i, j}, so a(3) = 3.
PROG
(PARI) sh(v)=vector(#v, i, my(n=i-1); sum(j=1, n, v[j]%n==0));
a(n)={
my(L=log(n+.5), t=primes(primepi(n)), D=divisors(prod(i=1, #t, t[i]^(L\log(t[i])))), nd=#D, v=[]);
for(i=1, nd^(n-1),
my(s=sh(vector(n, j, D[i\nd^(j-1)%nd+1])));
if(!setsearch(v, s),
v=vecsort(concat(v, [s]))
)
);
#v
};
(PARI) v=[]; fordiv(72, a, fordiv(72, b, fordiv(72, c, fordiv(72, d, fordiv(72, e, fordiv(72, f, fordiv(72, g, fordiv(72, h, fordiv(9, i, u=sh([a, b, c, d, e, f, g, h, i, 0]); if(!vecsearch(v, u), v=vecsort(concat(v, [u])))))))))))); (5+1)*(7+1)*#v \\ computes a(10)
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
Charles R Greathouse IV, Jun 06 2013
STATUS
approved