login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A319688 Sum of digits when n is represented in phitorial (A001088) base. 1
0, 1, 1, 2, 1, 2, 2, 3, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 3, 4, 4, 5, 4, 5, 5, 6, 1, 2, 2, 3, 2, 3, 3, 4, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 5, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
LINKS
FORMULA
Starting from i=3, compute the remainder when n is divided by phi(i), and then continue iterating with n -> floor(n/phi(i)), and i -> i+1, until n is zero. a(n) is the sum of remainders encountered in process.
For all n >= 0, a(A231722(n)) = n.
EXAMPLE
For n = 9, its phitorial representation is "102" as 9 = 1*A001088(2) + 0*A001088(3) + 2*A001088(4) = 1*1 + 0*2 + 2*4. Thus a(9) = 1+0+2 = 3.
For n = 577, its phitorial representation is "300001" as 577 = 1*A001088(2) + 3*A001088(7) = 1*1 + 3*192, thus a(577) = 4.
MATHEMATICA
With[{max = 7}, bases = EulerPhi[Range[max, 1, -1]]; nmax = Times @@ bases - 1; a[n_] := Plus @@ IntegerDigits[n, MixedRadix[bases]]; Array[a, nmax, 0]] (* Amiram Eldar, Jul 29 2023 *)
PROG
(PARI) A319688(n) = { my(s=0, i=3, d, b); while(n, b = eulerphi(i); d = (n%b); s += d; n = (n-d)/b; i++); (s); };
CROSSREFS
Cf. A000010, A001088 (gives the positions of ones), A231721, A231722.
Cf. also A000120, A034968, A276150.
Sequence in context: A304708 A367758 A358370 * A033922 A008624 A059169
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Oct 02 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 04:31 EDT 2024. Contains 371767 sequences. (Running on oeis4.)