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!)
A123212 Let S(1) = {1} and, for n > 1, let S(n) be the smallest set containing x, 2x and x^2 for each element x in S(n-1). a(n) is the sum of the elements in S(n). 1
1, 3, 7, 31, 383, 71679, 4313284607, 18447026747376402431, 340282367000167840050178713574329810943, 115792089237316195429848086745536112650120661123018741407845920610578123980799 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
If we take the cardinality of the set S(n) instead of the sum, we get the Fibonacci numbers 1,2,3,5,8,13,21,34,... If the set mapping uses x -> x, 2x and 3x instead of x -> x, 2x, and x^2, the corresponding sequence consists of the Stirling numbers of the second kind: 1, 6, 25, 90, 301, 966, 3025, ... (A000392).
LINKS
EXAMPLE
Under the indicated set mapping we have {1} -> {1,2} -> {1,2,4} -> {1,2,4,8,16}, giving the sums a(1)=1, a(2)=3, a(3)=7, a(4)=31, etc.
MAPLE
s:= proc(n) option remember; `if`(n=1, 1,
map(x-> [x, 2*x, x^2][], {s(n-1)})[])
end:
a:= n-> add(i, i=s(n)):
seq(a(n), n=1..10); # Alois P. Heinz, Jan 12 2022
MATHEMATICA
S[n_] := S[n] = If[n == 1, {1}, {#, 2#, #^2}& /@ S[n-1] // Flatten // Union];
a[n_] := S[n] // Total;
Table[a[n], {n, 1, 10}] (* Jean-François Alcover, Apr 22 2022 *)
PROG
(Python)
from itertools import chain, islice
def A123212_gen(): # generator of terms
s = {1}
while True:
yield sum(s)
s = set(chain.from_iterable((x, 2*x, x**2) for x in s))
A123212_list = list(islice(A123212_gen(), 10)) # Chai Wah Wu, Jan 12 2022
CROSSREFS
Sequence in context: A074047 A121810 A081475 * A213437 A070231 A263049
KEYWORD
nonn
AUTHOR
John W. Layman, Oct 05 2006
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 May 3 03:31 EDT 2024. Contains 372204 sequences. (Running on oeis4.)