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!)
A358127 a(n) is the cardinality of the set of pairwise gcd's of {prime(1)+1, ..., prime(n)+1}. 1
1, 3, 4, 5, 5, 5, 5, 7, 8, 8, 8, 9, 9, 11, 12, 14, 14, 14, 14, 14, 14, 15, 15, 15, 16, 16, 18, 19, 20, 21, 22, 22, 23, 23, 23, 23, 23, 24, 24, 26, 27, 29, 29, 30, 32, 32, 33, 35, 36, 36, 37, 37, 37, 37, 38, 38, 39, 39, 39, 39, 40, 40, 42, 42, 43, 43, 43, 44, 45, 45, 48, 48, 48, 48, 50, 50, 50, 50 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,2
LINKS
EXAMPLE
For n = 3 initial set is {2+1, 3+1, 5+1} and after applying gcd for each distinct pair of elements we get {1, 2, 3} set with cardinality of a(3) = 3.
PROG
(Python)
from sympy import nextprime
from math import gcd
from itertools import combinations
pr, terms = [2, 3], []
for i in range(100):
terms.append(len(set([gcd(t[0]+1, t[1]+1) for t in combinations(pr, 2)])))
pr.append(nextprime(pr[-1]))
print(terms)
(Python)
from math import gcd
from itertools import count, islice
from sympy import prime
def A358127_gen(): # generator of terms
a, b = [3], set()
for n in count(2):
q = prime(n)+1
b |= set(gcd(p, q) for p in a)
yield len(b)
a.append(q)
A358127_list = list(islice(A358127_gen(), 100)) # Chai Wah Wu, Nov 02 2022
CROSSREFS
Sequence in context: A220854 A122816 A064007 * A068568 A073169 A166268
KEYWORD
nonn
AUTHOR
Gleb Ivanov, Oct 30 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 September 4 22:02 EDT 2024. Contains 375685 sequences. (Running on oeis4.)