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!)
A352969 Start with {1}, then at each step replace it with the set of all pairwise products and sums of its elements (an element can be paired with itself). a(n) gives the number of elements after n-th step. 2
1, 2, 4, 11, 52, 678, 67144, 357306081 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
EXAMPLE
After the 1st step the set becomes {1*1, 1+1} = {1, 2}. It has 2 distinct elements so a(1) = 2.
After the 2nd step the set becomes {1*1, 1+1, 1*2, 1+2, 2*2, 2+2} = {1, 2, 2, 3, 4, 4} = {1, 2, 3, 4}. It has 4 distinct elements so a(2) = 4.
MATHEMATICA
Length /@ NestList[DeleteDuplicates[Flatten[Table[With[{a = #[[k]], b = #[[;; k]]}, {a b, a + b}], {k, Length[#]}]]] &, {1}, 6]
PROG
(PARI) lista(nn) = {my(v = [1]); print1(#v, ", "); for (n=1, nn, v = setunion(setbinop((x, y)->(x+y), v), setbinop((x, y)->(x*y), v)); print1(#v, ", "); ); } \\ Michel Marcus, Apr 13 2022
(Python)
from math import prod
from itertools import combinations_with_replacement
from functools import lru_cache
@lru_cache(maxsize=None)
def A352969_set(n):
if n == 0:
return {1}
return set(sum(x) for x in combinations_with_replacement(A352969_set(n-1), 2)) | set(prod(x) for x in combinations_with_replacement(A352969_set(n-1), 2))
def A353969(n):
return len(A352969_set(n)) # Chai Wah Wu, Apr 15 2022
CROSSREFS
Sequence in context: A267013 A318532 A057857 * A091233 A173312 A351184
KEYWORD
nonn,more,hard
AUTHOR
EXTENSIONS
a(7) from Thomas Scheuerle, Apr 13 2022
a(7) corrected by Chai Wah Wu, Apr 15 2022
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 August 24 14:46 EDT 2024. Contains 375416 sequences. (Running on oeis4.)