cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A361627 Positive integers such that GCD(A007504(n),n) != 1.

Original entry on oeis.org

18, 23, 24, 25, 30, 36, 42, 53, 54, 56, 57, 63, 78, 84, 85, 90, 99, 105, 111, 117, 123, 126, 129, 138, 154, 170, 177, 180, 190, 195, 207, 213, 222, 228, 230, 237, 238, 240, 245, 246, 252, 258, 270, 273, 275, 276, 282, 288, 297, 299, 303, 304, 309, 318, 319, 322, 327, 333, 339, 345
Offset: 1

Views

Author

Luca Onnis, Mar 18 2023

Keywords

Comments

A301274(k) != k implies that k is a term of this sequence.
Conjecture: a(n) ~ C*n as n -> infinity, where 5.25 < C < 5.35.

Examples

			18 is a term of this sequence since the sum of the first 18 primes is 501 and GCD(501,18) = 3 != 1.
		

Crossrefs

Programs

  • Mathematica
    s[n_] := Sum[Prime[k], {k, 1, n}];
    Complement[Table[n, {n, 1, 1000}], Flatten[Position[Table[GCD[s[n], n], {n, 1, 1000}], 1]]]
  • PARI
    isok(k) = gcd(vecsum(primes(k)), k) != 1; \\ Michel Marcus, Mar 18 2023
    
  • Python
    from math import gcd
    from itertools import count, islice
    from sympy import nextprime
    def A361627_gen(): # generator of terms
        p, s = 2, 2
        for n in count(1):
            if gcd(n,s) > 1:
                yield n
            s += (p:=nextprime(p))
    A361627_list = list(islice(A361627_gen(),20)) # Chai Wah Wu, Mar 22 2023