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: Kalle Siukola

Kalle Siukola's wiki page.

Kalle Siukola has authored 8 sequences.

A379938 Numbers k such that the k-th prime is a power of two reversed.

Original entry on oeis.org

1, 9, 18, 142, 575, 23652, 3633466, 10846595429, 802467018101, 2289255503212477
Offset: 1

Author

Kalle Siukola, Jan 06 2025

Keywords

Examples

			The 9th prime is 23, 23 reversed is 32, and 32 = 2^5, so 9 is a term.
		

Programs

  • Python
    import sympy
    for (k, p) in enumerate(sympy.primerange(10**8)):
        rev = int(str(p)[::-1])
        # is rev a power of two (or zero)?
        if rev & (rev - 1) == 0:
            print(k + 1, end=",")
    print()

Formula

A000040(a(n)) = A102385(n).
a(n) = A000720(A102385(n)). - Michel Marcus, Jan 07 2025

Extensions

a(8)-a(10) from Amiram Eldar, Jan 07 2025

A376898 Positive numbers k such that all the digits in the octal expansion of k^3 are distinct.

Original entry on oeis.org

1, 2, 5, 7, 10, 11, 14, 15, 22, 30, 37, 41, 49, 61, 74, 98, 122
Offset: 1

Author

Kalle Siukola, Oct 08 2024

Keywords

Comments

There are no terms >= 2^8 because 2^24-1 is the largest eight-digit octal number.

Examples

			11 is a term because 11^3 = 1331 = 2463_8 in octal and no octal digit occurs more than once.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[2^8],Length[IntegerDigits[#^3,8]]==Length[Union[IntegerDigits[#^3,8]]]&] (* James C. McMahon, Oct 16 2024 *)
  • Python
    for k in range(1, 2**8):
        octal = format(k**3, "o")
        if len(octal) == len(set(octal)): print(k, end=",")

A376897 Positive numbers k such that all the digits in the octal expansion of k^2 are distinct.

Original entry on oeis.org

1, 2, 4, 5, 7, 13, 14, 15, 18, 20, 21, 28, 30, 37, 39, 43, 44, 45, 53, 55, 63, 78, 84, 103, 110, 113, 117, 127, 149, 155, 156, 161, 162, 172, 173, 174, 175, 179, 220, 236, 242, 270, 286, 293, 299, 301, 340, 343, 350, 356, 361, 395, 407, 412, 425, 439, 461, 475, 499, 674, 819, 1001, 1211, 1230, 1244, 1323, 1764, 2450, 2751, 3213
Offset: 1

Author

Kalle Siukola, Oct 08 2024

Keywords

Comments

There are no terms >= 2^12 because 2^24-1 is the largest eight-digit octal number.

Examples

			110 is in the sequence because 110^2 = 12100 = 27504_8 and no octal digit occurs more than once.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[2^12], DuplicateFreeQ[IntegerDigits[#^2, 8]] &] (* Michael De Vlieger, Oct 12 2024 *)
  • Python
    for k in range(1, 2**12):
        octal = format(k**2, "o")
        if len(octal) == len(set(octal)): print(k, end=",")

A366826 Composite numbers whose proper substrings (of their decimal expansions) are all primes.

Original entry on oeis.org

4, 6, 8, 9, 22, 25, 27, 32, 33, 35, 52, 55, 57, 72, 75, 77, 237, 537, 737
Offset: 1

Author

Kalle Siukola, Oct 25 2023

Keywords

Comments

There are no terms greater than 999 because the only three-digit prime whose substrings are all primes is 373 (see A085823) and prepending or appending any prime digit to it would create a different three-digit substring.

Examples

			237 is included because it is composite and 2, 3, 7, 23 and 37 are all primes.
4 is included because it is composite and has no proper substrings.
		

Crossrefs

Subsequence of A002808.
Cf. A000040.

Programs

  • Python
    from itertools import combinations
    from sympy import isprime
    for n in range(2, 1000):
        if not isprime(n):
            properSubstrings = set(
                int(str(n)[start:end]) for (start, end)
                in combinations(range(len(str(n)) + 1), 2)
            ) - set((n,))
            if all(isprime(s) for s in properSubstrings):
                print(n, end=', ')

A307342 Products of four primes, except fourth powers of primes.

Original entry on oeis.org

24, 36, 40, 54, 56, 60, 84, 88, 90, 100, 104, 126, 132, 135, 136, 140, 150, 152, 156, 184, 189, 196, 198, 204, 210, 220, 225, 228, 232, 234, 248, 250, 260, 276, 294, 296, 297, 306, 308, 315, 328, 330, 340, 342, 344, 348, 350, 351, 364, 372, 375, 376, 380, 390
Offset: 1

Author

Kalle Siukola, Apr 02 2019

Keywords

Comments

Numbers with exactly four prime factors (counted with multiplicity) and more than one distinct prime factor.
Numbers n such that bigomega(n) = 4 and omega(n) > 1.

Crossrefs

Setwise difference of A014613 and A030514.
Union of A046386, A065036, A085986 and A085987.
Cf. A307682.

Programs

  • Mathematica
    Select[Range@ 400, And[! PrimePowerQ@ #, PrimeOmega@ # == 4] &] (* Michael De Vlieger, Apr 21 2019 *)
    Select[Range[400],PrimeOmega[#]==4&&PrimeNu[#]>1&] (* Harvey P. Dale, Aug 27 2021 *)
  • PARI
    isok(n) = (bigomega(n)==4) && (omega(n) > 1); \\ Michel Marcus, Apr 03 2019
  • Python
    import sympy
    def bigomega(n): return sympy.primeomega(n)
    def omega(n): return len(sympy.primefactors(n))
    print([n for n in range(1, 1000) if bigomega(n) == 4 and omega(n) > 1])
    

A307682 Products of four primes, two of which are distinct.

Original entry on oeis.org

24, 36, 40, 54, 56, 88, 100, 104, 135, 136, 152, 184, 189, 196, 225, 232, 248, 250, 296, 297, 328, 344, 351, 375, 376, 424, 441, 459, 472, 484, 488, 513, 536, 568, 584, 621, 632, 664, 676, 686, 712, 776, 783, 808, 824, 837, 856, 872, 875, 904, 999, 1016, 1029
Offset: 1

Author

Kalle Siukola, Apr 21 2019

Keywords

Comments

Numbers with exactly four prime factors (counted with multiplicity) and exactly two distinct prime factors.
Numbers n such that bigomega(n) = 4 and omega(n) = 2.
Products of a prime and the cube of a different prime (pq^3) together with squares of squarefree semiprimes (p^2*q^2).

Crossrefs

Union of A065036 and A085986.
Intersection of A007774 and A067801.
Intersection of A007774 and A195086.
Intersection of A014613 and A067801.
Intersection of A014613 and A195086.
Cf. A307342.

Programs

  • Mathematica
    Select[Range@ 1050, And[PrimeNu@ # == 2, PrimeOmega@ # == 4] &] (* Michael De Vlieger, Apr 21 2019 *)
  • PARI
    isok(n) = (bigomega(n) == 4) && (omega(n) == 2); \\ Michel Marcus, Apr 22 2019
  • Python
    import sympy
    def bigomega(n): return sympy.primeomega(n)
    def omega(n): return len(sympy.primefactors(n))
    print([n for n in range(1, 1000) if bigomega(n) == 4 and omega(n) == 2])
    

A307341 Products of four primes, not all distinct.

Original entry on oeis.org

16, 24, 36, 40, 54, 56, 60, 81, 84, 88, 90, 100, 104, 126, 132, 135, 136, 140, 150, 152, 156, 184, 189, 196, 198, 204, 220, 225, 228, 232, 234, 248, 250, 260, 276, 294, 296, 297, 306, 308, 315, 328, 340, 342, 344, 348, 350, 351, 364, 372, 375, 376, 380, 414
Offset: 1

Author

Kalle Siukola, Apr 02 2019

Keywords

Comments

Numbers with exactly four prime factors (counted with multiplicity) but fewer than four distinct prime factors.
Numbers n such that bigomega(n) = 4 and omega(n) < 4.

Crossrefs

Setwise difference of A014613 and A046386.
Union of A030514, A065036, A085986 and A085987.

Programs

  • PARI
    isok(n) = (bigomega(n) == 4) && (omega(n) < 4); \\ Michel Marcus, Apr 03 2019
  • Python
    import sympy
    def bigomega(n): return sympy.primeomega(n)
    def omega(n): return len(sympy.primefactors(n))
    print([n for n in range(1, 1000) if bigomega(n) == 4 and omega(n) < 4])
    

A285508 Numbers with exactly three prime factors, not all distinct.

Original entry on oeis.org

8, 12, 18, 20, 27, 28, 44, 45, 50, 52, 63, 68, 75, 76, 92, 98, 99, 116, 117, 124, 125, 147, 148, 153, 164, 171, 172, 175, 188, 207, 212, 236, 242, 244, 245, 261, 268, 275, 279, 284, 292, 316, 325, 332, 333, 338, 343, 356, 363, 369, 387, 388, 404, 412, 423, 425, 428, 436, 452
Offset: 1

Author

Kalle Siukola, Apr 20 2017

Keywords

Comments

Cubes of primes together with products of a prime and the square of a different prime.
Numbers k for which A001222(k) = 3, but A001221(k) < 3. - Antti Karttunen, Apr 20 2017

Crossrefs

Setwise difference of A014612 and A007304.
Union of A030078 and A054753.

Programs

  • Maple
    N:= 1000: # for terms <= N
    P:= select(isprime, [2,seq(i,i=3..N/4,2)]): nP:= nops(P):
    sort(select(`<=`,[seq(seq(P[i]*P[j]^2,i=1..nP),j=1..nP)],N)); # Robert Israel, Oct 20 2024
  • Mathematica
    Select[Range[452], PrimeOmega[#] == 3 && PrimeNu[#] < 3 &] (* Giovanni Resta, Apr 20 2017 *)
  • PARI
    isA285508(n) = ((omega(n) < 3) && (bigomega(n) == 3));
    n=0; k=1; while(k <= 10000, n=n+1; if(isA285508(n),write("b285508.txt", k, " ", n);k=k+1));
    \\ Antti Karttunen, Apr 20 2017
    
  • Python
    from sympy import primefactors, primeomega
    def omega(n): return len(primefactors(n))
    def bigomega(n): return primeomega(n)
    print([n for n in range(1, 501) if omega(n)<3 and bigomega(n) == 3]) # Indranil Ghosh, Apr 20 2017 and Kalle Siukola, Oct 25 2023
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A285508(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return int(n+x-sum(primepi(x//(k**2))-(a<<1)+primepi(isqrt(x//k))-1 for a,k in enumerate(primerange(integer_nthroot(x,3)[0]+1))))
        return bisection(f,n,n) # Chai Wah Wu, Oct 20 2024
  • Scheme
    ;; With my IntSeq-library.
    (define A285508 (MATCHING-POS 1 1 (lambda (n) (and (= 3 (A001222 n)) (< (A001221 n) 3))))) ;; Antti Karttunen, Apr 20 2017