login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A373834
a(n) = 1 if n is a multiple of A276150(n), otherwise 0, where A276150 is the digit sum in the primorial base.
5
1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1
OFFSET
0
FORMULA
For n >= 1, a(n) = [A373832(n) = 0], where [ ] is the Iverson bracket.
a(n) = A373851(A276086(n)).
EXAMPLE
a(0) = 1 because 0 is a multiple of A276150(0) = 0.
a(120) = 1 because 120 s a multiple of A276150(120) = 4.
PROG
(PARI)
A276150(n) = { my(s=0, p=2, d); while(n, d = (n%p); s += d; n = (n-d)/p; p = nextprime(1+p)); (s); };
A373834(n) = if(!n, 1, !(n%A276150(n)));
CROSSREFS
After the initial a(0)=1, characteristic function of A333426, primorial base Niven (or harshad) numbers: numbers divisible by their sum of digits in primorial base (A276150).
Sequence in context: A266591 A372553 A359779 * A132194 A354034 A174897
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 19 2024
STATUS
approved