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-6 of 6 results.

A014575 Vampire numbers (definition 2): numbers n with an even number of digits which have a factorization n = i*j where i and j have the same number of digits and the multiset of the digits of n coincides with the multiset of the digits of i and j.

Original entry on oeis.org

1260, 1395, 1435, 1530, 1827, 2187, 6880, 102510, 104260, 105210, 105264, 105750, 108135, 110758, 115672, 116725, 117067, 118440, 120600, 123354, 124483, 125248, 125433, 125460, 125500, 126027, 126846, 129640
Offset: 1

Views

Author

Keywords

Comments

The numbers i and j may not both have trailing zeros. Numbers may have more than one such factorization. However, each n is listed only once. [Comment modified by Rick L. Shepherd, Nov 02 2009]

Examples

			1260 = 21*60, 1395 = 15*93, 1435 = 35*41, 1530 = 30*51, etc.
		

References

  • C. A. Pickover, "Vampire Numbers." Ch. 30 in Keys to Infinity. New York: Wiley, pp. 227-231, 1995.

Crossrefs

The following sequences are all closely related: A020342, A014575, A080718, A280928, A048936, A144563.

Programs

  • Maple
    n := 1 :
    for dgs from 4 to 10 by 2 do
        for a from 10^(dgs-1) to 10^dgs-1 do
            amset := sort(convert(a,base,10)) ;
            isv := false ;
            for d in numtheory[divisors](a) do
                m := a/d ;
                if ( m >= d ) then
                    dset := convert(d,base,10) ;
                    mset := convert(m,base,10) ;
                    fset := sort([op(dset),op(mset)]) ;
                    if fset = amset and nops(dset) = nops(mset) then
                        if (m mod 10 <> 0 ) or (d mod 10 <> 0 ) then
                        printf("%d %d\n",n,a) ;
                        isv := true ;
                        n := n+1 ;
                        end if;
                    end if;
                end if;
                if isv then
                    break;
                end if;
            end do:
        end do:
    end do: # R. J. Mathar, Jan 10 2013
  • Mathematica
    fQ[n_] := If[OddQ@ IntegerLength@ n, False, MemberQ[Map[Sort@ Flatten@ IntegerDigits@ # &, Select[Map[{#, n/#} &, TakeWhile[Divisors@ n, # <= Sqrt@ n &]], SameQ @@ Map[IntegerLength, #] &]], Sort@ IntegerDigits@ n]]; Select[Range[10^6], fQ] (* Michael De Vlieger, Jan 27 2017 *)
  • PARI
    is(n)=my(v=digits(n));if(#v%2,return(0));fordiv(n,d,if(#Str(d)==#v/2 && #Str(n/d)==#v/2 && vecsort(v)==vecsort(digits(eval(Str(d,n/d)))) && (d%10 || (n/d)%10), return(1)));0 \\ Charles R Greathouse IV, Apr 19 2013
    
  • PARI
    is_A014575(n)={my(v=vecsort(Vecsmall(Str(n)))); #v%2 && return; my( M=10^(#v\2), L=M\10); fordiv(n,d, dA048933) if vampire number, or false (empty, 0) else. - M. F. Hasler, Mar 11 2021

Extensions

Edited by N. J. A. Sloane, Jan 03 2009

A020342 Vampire numbers: (definition 1): n has a nontrivial factorization using n's digits.

Original entry on oeis.org

126, 153, 688, 1206, 1255, 1260, 1395, 1435, 1503, 1530, 1827, 2187, 3159, 3784, 6880, 10251, 10255, 10426, 10521, 10525, 10575, 11259, 11439, 11844, 11848, 12006, 12060, 12384, 12505, 12546, 12550, 12595, 12600, 12762, 12768, 12798, 12843, 12955, 12964
Offset: 1

Views

Author

Keywords

Comments

Nontrivial means that there must be at least two factors.
For any a(n), 10*a(n) is also in the sequence, and also in A144563. - M. F. Hasler, Nov 01 2021

Examples

			1395 = 31*9*5, so 1395 is a term.
179739 = 7 * 9 * 9 * 317 so 179739 is a term. - _Sean A. Irvine_, Feb 28 2023
		

References

  • Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see p. 65.

Crossrefs

Closely related: A014575, A080718, A280928, A048936, A144563.

Programs

  • PARI
    is_A020342(n, m=0, D=vecsort(digits(n)))={ if(m && n >= m && vecsort(digits(n))==D, 1, #D<3, m && (D[1]>=m && vecprod(D)==n), n >= m^2, my(S=Set(D), i, C); fordiv(n,f, f < m && next; f*f > n && break; setminus(Set(digits(f)),S) && next; C=D; foreach(digits(f),d, if(i=vecsearch(C,d), C=C[^i], next(2))); C && is_A020342(n\f, f, C) && return(1)))} \\ See A144563 for a function counting the multiplicity of the representation. - M. F. Hasler, Nov 01 2021

Extensions

Edited by N. J. A. Sloane, Jan 03 2009

A048936 Subset of vampire numbers A014575 having exactly two representations of the desired form.

Original entry on oeis.org

125460, 11930170, 12054060, 12417993, 12600324, 12827650, 13002462, 22569480, 23287176, 26198073, 26373600, 26839800, 46847920, 61360780, 1001795850, 1013265360, 1017509850, 1018172470, 1044022896, 1047395790
Offset: 1

Views

Author

Keywords

Examples

			125460 = 204*615 = 246*510.
11930170 = 1301*9170 = 1310*9107.
12054060 = 2004*6015 = 2406*5010.
		

References

  • C. A. Pickover, "Vampire Numbers." Ch. 30 in Keys to Infinity. New York: Wiley, pp. 227-231, 1995.

Crossrefs

Closely related: A020342, A014575, A080718, A280928, A144563.
Cf. A014575, A048933, ..., A048939.

Extensions

Edited by N. J. A. Sloane, Jan 03 2009
Name edited by M. F. Hasler, Mar 11 2021

A280928 Composite numbers having the same digits as their prime factors (with multiplicity), including zero digits.

Original entry on oeis.org

1255, 12955, 17482, 25105, 100255, 101299, 105295, 107329, 117067, 124483, 127417, 129595, 132565, 145273, 146137, 149782, 163797, 174082, 174298, 174793, 174982, 250105, 256315, 263155, 295105, 297463, 307183, 325615, 371893, 536539, 687919, 1002955, 1004251, 1012099, 1025095, 1029955
Offset: 1

Views

Author

Ely Golden, Jan 11 2017

Keywords

Comments

Subsequence of A176670 as well as A020342.
Is this sequence the intersection of A176670 and A020342?
Excluding 1, all members of A080718 are members of this sequence. The first member of this sequence that is not a member of A080718 is a(17)=163797.

Examples

			100255 is a member of this sequence as 100255 = 5*20051, which is exactly the same set of digits as 100255.
		

Crossrefs

The following sequences are all closely related: A020342, A014575, A080718, A280928, A048936, A144563.

Programs

  • Python
    from sympy import factorint
    def ok(n):
        f = factorint(n)
        return sum(f.values()) > 1 and sorted(str(n)) == sorted("".join(str(p)*f[p] for p in f))
    print([k for k in range(700000) if ok(k)]) # Michael S. Branicky, Apr 20 2025
  • SageMath
    def digits(x, n):
        if((x<=0)|(n<2)):
            return []
        li=[]
        while(x>0):
            d=divmod(x, n)
            li.append(d[1])
            x=d[0]
        li.sort()
        return li;
    def factorDigits(x, n):
        if((x<=0)|(n<2)):
            return []
        li=[]
        f=list(factor(x))
        #ensures inequality of digits(x, n) and factorDigits(x, n) if x is prime
        if((len(f)==1)&(f[0][1]==1)):
            return [];
        for c in range(len(f)):
            for d in range(f[c][1]):
                ld=digits(f[c][0], n)
                li+=ld
        li.sort()
        return li;
    #this variable affects the radix
    radix=10
    c=2
    index=1
    while(index<=100):
        if(digits(c,radix)==factorDigits(c,radix)):
            print(str(index)+" "+str(c))
            index+=1
        c+=1
    print("complete")
    

A080718 1, together with numbers n that are the product of two primes p and q such that the multiset of the digits of n coincides with the multiset of the digits of p and q.

Original entry on oeis.org

1, 1255, 12955, 17482, 25105, 100255, 101299, 105295, 107329, 117067, 124483, 127417, 129595, 132565, 145273, 146137, 149782, 174082, 174298, 174793, 174982, 250105, 256315, 263155, 295105, 297463, 307183, 325615, 371893, 536539
Offset: 1

Views

Author

Jeff Heleen, Mar 06 2003

Keywords

Comments

Except for 1, this sequence is a subsequence of A280928. More specifically, members of A280928 are also members of this sequence if and only if they are semiprime. - Ely Golden, Jan 11 2017
This sequence has no equivalent in odd bases. This is because any equivalent of A280928 in an odd base must have all terms having at least 3 prime factors. - Ely Golden, Jan 11 2017
All entries other than 1 are congruent to 4 mod 9, because p*q == p + q mod 9 (with p and q not both divisible by 3) implies p*q == 4 mod 9. - Robert Israel, May 05 2014

Examples

			1255 = 5*251, 12955 = 5*2591, 17482 = 2*8741, 100255 = 5*20051, 146137=317*461, etc.
		

Crossrefs

The following sequences are all closely related: A020342, A014575, A080718, A280928, A048936, A144563.

Programs

  • Maple
    filter:= proc(n) local F,p,q,Ln,Lpq;
      F:= ifactors(n)[2];
      if nops(F) > 2 or convert(F,`+`)[2]<>2 then return false fi;
      p:= F[1][1];
      if nops(F) = 2 then q:= F[2][1] else q:= F[1][1] fi;
      Ln:= sort(convert(n,base,10));
      Lpq:= sort([op(convert(p,base,10)),op(convert(q,base,10))]);
      evalb(Ln = Lpq);
    end proc:
    filter(1):= true:
    A080718:= select(filter,[1, seq(4+9*i,i=1..10^6)]); # Robert Israel, May 04 2014
  • Mathematica
    ptpQ[n_]:=Module[{sidn=Sort[IntegerDigits[n]],fi=Transpose[ FactorInteger[ n]]}, fi[[2]]=={1,1}&&Sort[Flatten[ IntegerDigits/@ fi[[1]]]]==sidn]; Join[{1}, Select[Range[4,550000,9],ptpQ]] (* Harvey P. Dale, Jun 22 2014 *)
  • Python
    from sympy import factorint
    from itertools import count, islice
    def agen(): # generator
        yield 1
        for k in count(4, 9):
            t = sorted(str(k))
            f = factorint(k)
            if sum(f.values()) == 2:
                p, q = min(f), max(f)
                if t == sorted(str(p)+str(q)):
                    yield k
    print(list(islice(agen(), 30))) # Michael S. Branicky, Apr 20 2025

Extensions

Edited by N. J. A. Sloane, Jan 03 2009
Incorrect entry 163797 removed by Robert Israel, May 04 2014

A048933 Smallest factor i of any factorization used in the definition of A014575(n).

Original entry on oeis.org

21, 15, 35, 30, 21, 27, 80, 201, 260, 210, 204, 150, 135, 158, 152, 161, 167, 141, 201, 231, 281, 152, 231, 204, 251, 201, 261, 140, 179, 311, 323, 315, 317, 231, 351, 215, 146, 350, 351, 317, 156, 300, 251, 261, 356, 240, 269, 165, 176, 396, 221, 231, 371, 231, 225, 201, 225, 281, 216, 210, 210, 327, 395, 275, 252, 255
Offset: 1

Views

Author

Keywords

References

  • C. A. Pickover, "Vampire Numbers." Ch. 30 in Keys to Infinity. New York: Wiley, pp. 227-231, 1995.

Crossrefs

The following sequences are all closely related: A020342, A014575, A080718, A048936, A144563.
Cf. A048934, ..., A048939.

Programs

Extensions

Edited by N. J. A. Sloane, Jan 03 2009
More terms from R. J. Mathar, Jul 15 2016
Showing 1-6 of 6 results.