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-10 of 15 results. Next

A084994 Duplicate of A046328.

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
Offset: 1

Views

Author

Keywords

A097393 Emirpimes: numbers n such that n and its reversal are distinct semiprimes.

Original entry on oeis.org

15, 26, 39, 49, 51, 58, 62, 85, 93, 94, 115, 122, 123, 129, 143, 155, 158, 159, 169, 177, 178, 183, 185, 187, 203, 205, 221, 226, 265, 289, 302, 314, 319, 321, 326, 327, 329, 335, 339, 341, 355, 381, 394, 398, 413, 415, 437, 493, 497, 502, 511, 514, 533
Offset: 1

Views

Author

Keywords

Comments

Computed by Eric W. Weisstein, Aug 13 2004.

Examples

			26 is a semiprime, as it is 2 * 13, and so is 62 = 2 * 31. 26 and 62 are therefore both in the sequence.
		

Crossrefs

Equals A085751 \ A046328.

Programs

  • Maple
    isA097393 := proc(n)
        local R ;
        R := digrev(n) ;
        if R <> n then
            if numtheory[bigomega](R) = 2 and numtheory[bigomega](n) = 2 then
                return true;
            else
                false;
            end if;
          else
            false;
        end if;
    end proc:
    for n from 1 to 500 do
        if isA097393(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Apr 05 2012
  • Mathematica
    Cases[{#, IntegerReverse@#} & /@ DeleteCases[Range@5000, ?PalindromeQ], {?(PrimeOmega@# == 2 &) ..}][[All,1]] (* Hans Rudolf Widmer, Jan 07 2024 *)
  • PARI
    rev(n)=subst(Polrev(digits(n)),'x,10)
    issemi(n)=bigomega(n)==2
    list(lim)=my(v=List(),r);forprime(p=2,lim\2,forprime(q=2,min(lim\p,p),r=rev(p*q);if(issemi(r)&&r!=p*q,listput(v,p*q))));Set(v) \\ Charles R Greathouse IV, Jan 27 2015
    
  • Python
    from sympy import factorint
    from itertools import islice
    def sp(n): f = factorint(n); return sum(f[p] for p in f) == 2
    def ok(n): r = int(str(n)[::-1]); return r != n and sp(n) and sp(r)
    print([k for k in range(534) if ok(k)]) # Michael S. Branicky, Jul 03 2022

A046376 Palindromes with exactly 2 palindromic prime factors (counted with multiplicity), and no other prime factors.

Original entry on oeis.org

4, 6, 9, 22, 33, 55, 77, 121, 202, 262, 303, 393, 505, 626, 707, 939, 1111, 1441, 1661, 1991, 3443, 3883, 7997, 10201, 13231, 15251, 18281, 19291, 20602, 22622, 22822, 24842, 26662, 28682, 30903, 31613, 33933, 35653, 37673, 38683, 39993, 60206, 60406, 60806
Offset: 1

Views

Author

Patrick De Geest, Jun 15 1998

Keywords

Comments

Equivalently, semiprime palindromes where both prime factors are palindromes. - Franklin T. Adams-Watters, Apr 11 2011
The sequence "trivially" includes products of palindromic primes p*q where
a) p = 2 or 3 and q has only digits < 4, as q = 11, 101, 131, 10301, 30103, ...
b) p <= 11 and q has only digits 0 and 1, as q = 101 and repunit primes A004022
c) p = 11 and q has only digits spaced out by zeros, as q = 101, 10301, 10501, 10601, 30103, 30203, 30403, 30703, 30803, ... - M. F. Hasler, Jan 04 2022

Examples

			The palindrome 35653 is a term since it has 2 factors, 101 and 353, both palindromic.
		

Crossrefs

Cf. A001358 (semiprimes), A002113 (palindromes), A002385 (palindromic primes).
Subsequence of A188650.

Programs

  • Mathematica
    Take[Select[Times@@@Tuples[Select[Prime[Range[5000]],PalindromeQ],2], PalindromeQ]// Union,50] (* Harvey P. Dale, Aug 25 2019 *)
  • PARI
    {first(N=50, p=1) = vector(N, i, until( bigomega( p=nxt_A002113(p))==2 && vecmin( apply( is_A002113, factor(p)[,1])),); p)} \\ M. F. Hasler, Jan 04 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):
        f = factorint(pal)
        return sum(f.values()) == 2 and all(ispal(p) for p in f)
    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

Formula

Intersection of A002113 and A046368; A188649(a(n)) = a(n). - Reinhard Zumkeller, Apr 11 2011

Extensions

Definition clarified by Franklin T. Adams-Watters, Apr 11 2011
More terms from Lars Blomberg, Nov 06 2015

A046408 Palindromes with exactly 2 distinct palindromic prime factors.

Original entry on oeis.org

6, 22, 33, 55, 77, 202, 262, 303, 393, 505, 626, 707, 939, 1111, 1441, 1661, 1991, 3443, 3883, 7997, 13231, 15251, 18281, 19291, 20602, 22622, 22822, 24842, 26662, 28682, 30903, 31613, 33933, 35653, 37673, 38683, 39993, 60206, 60406, 60806, 62026, 64646, 64846
Offset: 1

Views

Author

Patrick De Geest, Jun 15 1998

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[65000],PalindromeQ[#]&&Total[Boole[PalindromeQ/@ FactorInteger[ #][[All,1]]]]==2&&PrimeOmega[#]==2&] (* Harvey P. Dale, Aug 07 2021 *)
  • PARI
    ispal(n) = my(d=digits(n)); d == Vecrev(d) \\ A002113
    for(k=1, 1e5, if(ispal(k)&&bigomega(k)==2,a=divisors(k); if(#a==4&&ispal(a[2])&&ispal(a[3]), print1(k,", ")))) \\ Alexandru Petrescu, Aug 14 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):
        f = factorint(pal)
        return len(f) == 2 and sum(f.values()) == 2 and all(ispal(p) for p in f)
    print(list(filter(ok, (p for d in range(1, 6) for p in pals(d) if ok(p))))) # Michael S. Branicky, Jun 22 2021
    

Extensions

a(41) and beyond from Michael S. Branicky, Jun 22 2021

A196104 Repdigit semiprimes (semiprimes composed of identical digits).

Original entry on oeis.org

4, 6, 9, 22, 33, 55, 77, 111, 1111, 11111, 1111111, 11111111111, 11111111111111111, 2222222222222222222, 3333333333333333333, 5555555555555555555, 7777777777777777777, 22222222222222222222222, 33333333333333333333333, 55555555555555555555555
Offset: 1

Views

Author

Michel Lagneau, Oct 27 2011

Keywords

Comments

A semiprime can be repdigit (base 10) in only three ways. It can be a single-digit semiprime, a repunit semiprime (A102782), or a repunit prime times a prime digit {2, 3, 5, 7}. Occurs in proof that the sequence is infinite in which a(n) is the least semiprime > a(n-1) such that a(n) has no digit in common with a(n-1). - Jonathan Vos Post; corrected by Max Alekseyev, Sep 14 2022

Examples

			a(12) = 11111111111 = 21649 * 513239 is semiprime.
		

Crossrefs

Subsequence of A046328.
Except for initial terms, subsequence of A116063.

Programs

  • Maple
    with(numtheory):for n from 1 to 23 do:for b from 1 to 9 do:x:=(((10^n)- 1)/9)*b:if bigomega(x)=2 then printf(`%d, `,x):else fi:od:od:
  • Mathematica
    Select[FromDigits/@Flatten[Table[PadRight[{},i,n],{i,25},{n,9}],1], PrimeOmega[ #] ==2&] (* Harvey P. Dale, Mar 11 2019 *)
  • PARI
    print1("4, 6, 9");for(n=1,20,t=10^n\9;if(bigomega(t)==2,print1(", "t)); if(isprime(t),forprime(p=2,7,print1(", "p*t)))) \\ Charles R Greathouse IV, Oct 27 2011

Formula

Union of {4, 6, 9}, A102782, 2*A004022, 3*A004022, 5*A004022, and 7*A004022. - Jonathan Vos Post and R. J. Mathar, Oct 27 2011

Extensions

Edited by Max Alekseyev, Sep 14 2022

A046392 Palindromes with exactly 2 distinct prime factors.

Original entry on oeis.org

6, 22, 33, 55, 77, 111, 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

Crossrefs

Intersection of A002113 and A006881.

Programs

  • Maple
    revdigs:= proc(n) local L,i;
      L:= convert(n,base,10);
      add(L[-i]*10^(i-1),i=1..nops(L))
    end proc:
    f:= proc(n) local F;
      F:= ifactors(n)[2];
      if nops(F) = 2 and F[1,2]=1 and F[2,2]=1 then n fi
    end proc:
    N:=5: # for terms of up to N digits.
    Res:= 6:
    for d from 2 to N do
      if d::even then
        m:= d/2;
        Res:= Res, seq(f(n*10^m + revdigs(n)), n=10^(m-1)..10^m-1);
      else
        m:= (d-1)/2;
        Res:= Res, seq(seq(f(n*10^(m+1)+y*10^m+revdigs(n)), y=0..9), n=10^(m-1)..10^m-1);
      fi
    od:
    Res; # Robert Israel, Mar 24 2020
  • Mathematica
    pdpfQ[n_]:=Module[{idn=IntegerDigits[n]},idn==Reverse[idn] && PrimeNu[n] == PrimeOmega[n] == 2]; Select[Range[11000],pdpfQ] (* Harvey P. Dale, Dec 16 2012 *)
  • Python
    from sympy import factorint
    from itertools import product
    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): f = factorint(pal); return len(f) == 2 and sum(f.values()) == 2
    print(list(filter(ok, (p for d in range(1, 5) for p in pals(d) if ok(p))))) # Michael S. Branicky, Jun 22 2021

A210616 Digit reversal of n-th semiprime.

Original entry on oeis.org

4, 6, 9, 1, 41, 51, 12, 22, 52, 62, 33, 43, 53, 83, 93, 64, 94, 15, 55, 75, 85, 26, 56, 96, 47, 77, 28, 58, 68, 78, 19, 39, 49, 59, 601, 111, 511, 811, 911, 121, 221, 321, 921, 331, 431, 141, 241, 341, 541, 641, 551, 851, 951, 161, 661, 961, 771, 871, 381
Offset: 1

Views

Author

Jonathan Vos Post, Mar 23 2012

Keywords

Comments

The fixed points where a(n) = n are A046328.

Crossrefs

Programs

  • Mathematica
    t = Select[Range[200], PrimeOmega[#] == 2 &]; FromDigits[Reverse[IntegerDigits[#]]] & /@ t (* T. D. Noe, Mar 26 2012 *)
    IntegerReverse/@Select[Range[500],PrimeOmega[#]==2&] (* Harvey P. Dale, Dec 06 2021 *)

Formula

a(n) = R(A001358(n)) = A004086(A001358(n)).

A324988 Palindromes whose number of divisors is palindromic.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 44, 55, 66, 77, 88, 99, 101, 111, 121, 131, 141, 151, 161, 171, 181, 191, 202, 212, 222, 232, 242, 262, 282, 292, 303, 313, 323, 333, 343, 353, 363, 373, 383, 393, 404, 424, 434, 454, 474, 484, 494, 505, 515, 535, 545
Offset: 1

Views

Author

Jaroslav Krizek, Mar 23 2019

Keywords

Comments

Numbers m such that m and A000005(m) = tau(m) are both in A002113.

Examples

			Number of divisors of palindrome number 22 with divisors 1, 2, 11 and 22 is 4 (palindrome number).
		

Crossrefs

Similar sequences for functions sigma(m) and pod(m): A028986, A324989.
Includes A002385, A046328 and A046329.

Programs

  • Magma
    [n: n in [1..1000] | Intseq(n, 10) eq Reverse(Intseq(n, 10)) and Intseq(NumberOfDivisors(n), 10) eq Reverse(Intseq(NumberOfDivisors(n), 10))]
    
  • Maple
    ispali:= proc(n) local L; L:= convert(n,base,10); L = ListTools:-Reverse(L) end proc:
    select(t -> ispali(t) and ispali(numtheory:-tau(t)), [$1..10000]); # Robert Israel, Mar 26 2019
  • Mathematica
    Select[Range@ 600, And[PalindromeQ@ #, PalindromeQ@ DivisorSigma[0, #]] &] (* Michael De Vlieger, Mar 24 2019 *)
  • PARI
    ispal(n) = my(d=digits(n)); Vecrev(d) == d;
    isok(n) = ispal(n) && ispal(numdiv(n)); \\ Michel Marcus, Mar 23 2019

A075812 Palindromic odd numbers with exactly 2 prime factors (counted with multiplicity).

Original entry on oeis.org

9, 33, 55, 77, 111, 121, 141, 161, 303, 323, 393, 505, 515, 535, 545, 565, 707, 717, 737, 767, 939, 949, 959, 979, 989, 1111, 1441, 1661, 1991, 3113, 3223, 3443, 3883, 7117, 7447, 7997, 9119, 9229, 9449, 10001, 10201, 10401, 10801, 10901, 11111
Offset: 1

Views

Author

Jani Melik, Oct 13 2002

Keywords

Examples

			9=3^2, 33=3*11 and 55=5*11 are palindromic, odd and are products of exactly 2 prime factors.
		

Crossrefs

Cf. A046315.
Odd subsequence of A046328.

Programs

  • Maple
    test := proc(n) local d; d := convert(n,base,10); return ListTools[Reverse](d)=d and numtheory[bigomega](n)=2; end; a := []; for n from 1 to 14000 by 2 do if test(n) then a := [op(a),n]; end; od; a;

Extensions

Edited by Dean Hickerson, Oct 21 2002

A108505 Number of palindromic semiprimes less than 10^n.

Original entry on oeis.org

0, 3, 7, 36, 50, 269, 367, 2181, 2816, 18391, 23617, 160773, 203733, 1429749, 1788486, 12808711, 15889727
Offset: 0

Views

Author

Robert G. Wilson v, Jun 06 2005

Keywords

Comments

Does the limit n-> inf. a(n+2)/a(n) =~ 8*Pi^2/9?

Crossrefs

Cf. A046328.

Programs

  • Mathematica
    NextPalindrome[n_] := Block[ {l = Floor[ Log[10, n] + 1], idn = IntegerDigits[n]}, If[ Union[ idn] == {9}, Return[n + 2], If[l < 2, Return[n + 1], If[ FromDigits[ Reverse[ Take[ idn, Ceiling[l/2]]]] > FromDigits[ Take[ idn, -Ceiling[l/2]]], FromDigits[ Join[ Take[ idn, Ceiling[l/2]], Reverse[ Take[ idn, Floor[l/2]]] ]], idfhn = FromDigits[ Take[ idn, Ceiling[l/2]]] + 1; idp = FromDigits[ Join[ IntegerDigits[ idfhn], Drop[ Reverse[ IntegerDigits[ idfhn]], Mod[l, 2]]]] ]]]]; fQ[n_] := Plus @@ Last /@ FactorInteger[n] == 2; c = np = 0; Do[ While[np < 10^n, If[ fQ[np], c++ ]; np = NextPalindrome[np]]; Print[c], {n, 0, 12}]

Extensions

a(15)-a(16) from Donovan Johnson, Mar 14 2010
Showing 1-10 of 15 results. Next