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.

Showing 1-2 of 2 results.

A046337 Odd numbers with an even number of prime factors (counted with multiplicity).

Original entry on oeis.org

1, 9, 15, 21, 25, 33, 35, 39, 49, 51, 55, 57, 65, 69, 77, 81, 85, 87, 91, 93, 95, 111, 115, 119, 121, 123, 129, 133, 135, 141, 143, 145, 155, 159, 161, 169, 177, 183, 185, 187, 189, 201, 203, 205, 209, 213, 215, 217, 219, 221, 225, 235, 237, 247, 249, 253, 259
Offset: 1

Views

Author

Patrick De Geest, Jun 15 1998

Keywords

Crossrefs

Intersection of A005408 and A028260.
Setwise difference A005408 \ A067019.
Setwise difference A028260 \ A063745.
Union of A359161 and A359163.
Union of A327862 and A360110.
Subsequence of A345452, of A356312 and of A359371.
Positions of positive terms in A166698, positions of even terms in A327858 and A356299.
Subsequences: A002557, A046315 (odd semiprimes), A056913, A359596, A359607, A359608 (without its term 2).
Cf. A000035, A008836, A046338, A046470, A353557 (characteristic function), A358777.
Cf. also A036349, A297845.

Programs

  • Mathematica
    Select[Range[1,301,2],EvenQ[PrimeOmega[#]]&] (* Harvey P. Dale, Jul 25 2011 *)
  • PARI
    lista(nn) = {forstep(n=1, nn, 2, if (bigomega(n) % 2 == 0, print1(n, ", ")));} \\ Michel Marcus, Jul 04 2015

Formula

{k | A000035(k) > 0 and A008836(k) > 0}. - Antti Karttunen, Jan 13 2023

A046328 Palindromes with exactly 2 prime factors (counted with multiplicity).

Original entry on oeis.org

4, 6, 9, 22, 33, 55, 77, 111, 121, 141, 161, 202, 262, 303, 323, 393, 454, 505, 515, 535, 545, 565, 626, 707, 717, 737, 767, 818, 838, 878, 898, 939, 949, 959, 979, 989, 1111, 1441, 1661, 1991, 3113, 3223, 3443, 3883, 7117, 7447, 7997, 9119, 9229, 9449, 10001
Offset: 1

Views

Author

Patrick De Geest, Jun 15 1998

Keywords

Examples

			111 is a palindrome and 111 = 3*37. 3 and 37 are primes.
		

Crossrefs

Subsequence of A001358 and A046338.

Programs

  • Mathematica
    fQ[n_] := Block[{id = IntegerDigits[n]}, Plus @@ Last /@ FactorInteger[n] == 2 && id == Reverse[id]]; Select[ Range[ 10000], fQ[ # ] &] (* Robert G. Wilson v, Jun 06 2005 *)
    Select[Range[10002], Reverse[x = IntegerDigits[#]] == x && PrimeOmega[#] == 2 &] (* Jayanta Basu, Jun 23 2013 *)
    Select[Range[11000],PalindromeQ[#]&&PrimeOmega[#]==2&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 30 2018 *)
  • PARI
    ispal(n) = my(d=digits(n));d == Vecrev(d) \\ A002113
    for(k=1,1e4,if(ispal(k)&&bigomega(k)==2, print1(k, ", "))) \\ Alexandru Petrescu, Jul 07 2022
    
  • Python
    from sympy import factorint
    from itertools import product
    def ispal(n): s = str(n); return s == s[::-1]
    def pals(d, base=10): # all d-digit palindromes
        digits = "".join(str(i) for i in range(base))
        for p in product(digits, repeat=d//2):
            if d > 1 and p[0] == "0": continue
            left = "".join(p); right = left[::-1]
            for mid in [[""], digits][d%2]: yield int(left + mid + right)
    def ok(pal): return sum(factorint(pal).values()) == 2
    print(list(filter(ok, (p for d in range(1, 6) for p in pals(d) if ok(p))))) # Michael S. Branicky, Aug 14 2022
Showing 1-2 of 2 results.