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.

User: Luke Zieroth

Luke Zieroth's wiki page.

Luke Zieroth has authored 3 sequences.

A287534 Composite numbers whose digits are restricted to 1, 3, 7, and 9.

Original entry on oeis.org

9, 33, 39, 77, 91, 93, 99, 111, 113, 117, 119, 133, 171, 177, 319, 333, 339, 371, 377, 391, 393, 399, 711, 713, 717, 731, 737, 771, 777, 779, 791, 793, 799, 913, 917, 931, 933, 939, 973, 979, 993, 999
Offset: 1

Author

Luke Zieroth, May 26 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Flatten@ Array[FromDigits /@ Tuples[{1, 3, 7, 9}, #] &, 3], CompositeQ] (* Michael De Vlieger, Jun 01 2017 *)

A287353 a(0)=0; for n>0, a(n) = 10*a(n-1) + prime(n).

Original entry on oeis.org

0, 2, 23, 235, 2357, 23581, 235823, 2358247, 23582489, 235824913, 2358249159, 23582491621, 235824916247, 2358249162511, 23582491625153, 235824916251577, 2358249162515823, 23582491625158289
Offset: 0

Author

Luke Zieroth, May 23 2017

Keywords

Crossrefs

Cf. A379426 (prime terms).

Programs

  • Mathematica
    FoldList[10 #1 + Prime@ #2 &, 0, Range@ 17] (* Michael De Vlieger, May 24 2017 *)
  • PARI
    a(n) = fromdigits(primes(n)); \\ Kevin Ryde, Jun 22 2022
  • Python
    from sympy import prime
    l = [0]
    for i in range(20):
        l += [10 * l[i] + prime(i + 1)]
    print(l) # Indranil Ghosh, May 25 2017
    

Formula

a(n) = Sum_{i=1..n} 10^(n-i)*prime(i), n >= 1. - Ya-Ping Lu, Dec 24 2024

A287198 Numbers with the property that every cyclic permutation of its digits is a composite number with none of its permutations sharing any common prime factors.

Original entry on oeis.org

4, 6, 8, 9, 25, 49, 52, 56, 58, 65, 85, 94, 116, 134, 145, 158, 161, 178, 187, 253, 275, 295, 325, 341, 358, 413, 451, 514, 527, 529, 532, 581, 583, 589, 611, 718, 752, 781, 815, 817, 835, 871, 895, 899, 952, 958, 989, 998, 1154, 1156, 1159, 1165, 1189, 1192
Offset: 1

Author

Luke Zieroth, May 21 2017

Keywords

Comments

Subsequence of A052382, as a number with a zero digit have cyclic permutations of the forms 0x and x0 which share prime factors of x. The only exception to this argument is 10, but 01 is not composite, so 10 is not a member of the sequence as well. - Chai Wah Wu, May 24 2017
If m is a multiple of 11 with an even number of digits, then m is not a term. - Chai Wah Wu, May 30 2017

Examples

			The numbers formed by cyclic permutations of 134 are 341 and 413. The factors of 134 are 2 and 67, the factors of 341 are 11 and 31, and the factors of 413 are 7 and 59. Since these numbers are all composite and none share any common factors with each other, 134 is included on the list.
		

Crossrefs

Programs

  • Mathematica
    ok[n_] := Catch@ Block[{t = FromDigits /@ (RotateLeft[IntegerDigits[n], #] & /@ Range[ IntegerLength@ n])}, If[! AllTrue[t, CompositeQ], Throw@False]; Do[ If[ GCD[t[[i]], t[[j]]] > 1, Throw@False], {i, Length@t}, {j, i-1}]; True]; Select[ Range@ 1200, ok] (* Giovanni Resta, May 25 2017 *)
  • PARI
    is(n) = {my(d=digits(n), v=vector(#d)); v[1]=n; if(isprime(n)||n==10, return(0)); for(i=2, #d, v[i] = v[i-1]\10; v[i] = v[i]+(v[i-1]-v[i]*10)*10^(#d-1); if(isprime(v[i]), return(0)); for(j=1,i-1,if(gcd(v[j], v[i])>1, return(0)))); n>1} \\ David A. Corneth, May 25 2017
    
  • Python
    from gmpy2 import is_prime, gcd, mpz
    A287198_list, n  = [], 2
    while n <= 10**6:
        s = str(n)
        if not is_prime(n) and '0' not in s:
            k = n
            for i in range(len(s)-1):
                s = s[1:]+s[0]
                m = mpz(s)
                if is_prime(m) or gcd(k,m) > 1:
                    break
                k *= m
            else:
                A287198_list.append(n)
        n += 1 # Chai Wah Wu, May 27 2017