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!)
A358178 a(n) is the cardinality of the set of distinct pairwise gcd's of {1! + 1, ..., n! + 1}. 0
0, 1, 1, 1, 1, 2, 2, 2, 3, 4, 4, 4, 4, 4, 4, 5, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 11, 12, 12, 12, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,6
LINKS
EXAMPLE
For n = 6 initial set is {1+1, 2+1, 6+1, 24+1, 120+1, 720+1} and after applying gcd for each distinct pair of elements we get {1, 7} set with cardinality of a(6) = 2.
PROG
(Python)
from math import gcd, factorial
from itertools import combinations
f, terms = [2, ], []
for i in range(2, 100):
f.append(factorial(i)+1)
terms.append(len(set([gcd(*t) for t in combinations(f, 2)])))
print(terms)
(Python)
from math import gcd
from itertools import count, islice
def A358178_gen(): # generator of terms
m, f, g = 1, [], set()
for n in count(1):
m *= n
g |= set(gcd(d, m+1) for d in f)
f.append(m+1)
yield len(g)
A358178_list = list(islice(A358178_gen(), 20)) # Chai Wah Wu, Dec 15 2022
CROSSREFS
Sequence in context: A322210 A228482 A091822 * A173022 A060973 A352228
KEYWORD
nonn
AUTHOR
Gleb Ivanov, Nov 02 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 April 24 00:30 EDT 2024. Contains 371917 sequences. (Running on oeis4.)