OFFSET
0,2
REFERENCES
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..10000
J.-P. Allouche and J. Shallit, The ring of k-regular sequences, Theoretical Computer Sci., 98 (1992), 163-197.
Hsien-Kuei Hwang, Svante Janson, and Tsung-Hsi Tsai, Identities and periodic oscillations of divide-and-conquer recurrences splitting at half, arXiv:2210.10968 [cs.DS], 2022, p. 53.
Hsien-Kuei Hwang, Svante Janson, and Tsung-Hsi Tsai, Periodic minimum in the count of binomial coefficients not divisible by a prime, arXiv:2408.06817 [math.NT], 2024. See p. 1.
Akhlesh Lakhtakia and Russell Messier, Self-similar sequences and chaos from Gauss sums, Computers & graphics 13.1 (1989): 59-62.
Akhlesh Lakhtakia and Russell Messier, Self-similar sequences and chaos from Gauss sums, Computers & Graphics 13.1 (1989), 59-62. (Annotated scanned copy)
Akhlesh Lakhtakia and Russell Messier, Self-similar sequences and chaos from Gauss sums, Computers & Graphics 13.1 (1989), 59-60. (Annotated scanned copy)
A. Lakhtakia et al., Fractal sequences derived from the self-similar extensions of the Sierpinski gasket, J. Phys. A 21 (1988), 1925-1928.
MATHEMATICA
Table[Sum[Times@@(IntegerDigits[m, 3]+1), {m, 0, n}], {n, 0, 80}] (* Vincenzo Librandi, Feb 18 2026 *)
PROG
(Python)
from math import prod
from gmpy2 import digits
def A006048(n): return sum(prod(int(d)+1 for d in digits(m, 3)) for m in range(n+1)) # Chai Wah Wu, Aug 10 2025
(Python)
from math import prod
from gmpy2 import digits
def A006048(n):
d = list(map(lambda x:int(x)+1, digits(n+1, 3)[::-1]))
return sum((b-1)*prod(d[a:])*6**a for a, b in enumerate(d))>>1 # Chai Wah Wu, Aug 13 2025
(Magma) [&+[ &*[ d+1 : d in (m eq 0 select [0] else IntegerToSequence(m, 3))]: m in [0..n]] : n in [0..67]]; // Vincenzo Librandi, Feb 18 2026
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from N. J. A. Sloane, Apr 23 2025
STATUS
approved
