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-9 of 9 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

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

A144563 Subset of A020342 (vampire numbers, definition 1) listing numbers which have more than one such representation of the desired form.

Original entry on oeis.org

1260, 1395, 1530, 6880, 12060, 12550, 12600, 13950, 14350, 15030, 15300, 18270, 21870, 31590, 37840, 68800, 102510, 102550, 104260, 105210, 105250, 105264, 105750, 112590, 114390, 116928, 118440, 118480, 119682, 120060, 120600, 123840, 125050, 125460, 125500, 125950
Offset: 1

Views

Author

N. J. A. Sloane, Jan 03 2009, based on email from Zak Seidov

Keywords

Comments

From M. F. Hasler, Nov 01 2021: (Start)
If x is in A020342, then 10*x is in this sequence, and this makes up most of the terms. Exceptions are the terms not ending in 0, {1395, 105264, 116928, 119682, 192375, 258795, 263736, 268398, 289674, 1008126, 1133484, 1173939, ...}. There are terms of the form 10*x in A020342 with x not in A020342, like {25510, 45760, 67950, 136590, 146520, 168520, 175560, 246150, 250510, 255010, ...}. Is any such term in this sequence A144563, or can it be proved there isn't?
All terms have at least 3 distinct prime factors (omega, A001221), and 4 prime factors counted with multiplicity (bigomega, A001222). The squarefree terms are {132430, 174370, 1012990, 1073290, 1094730, 1156990, 1170670, 117393, ...}. (End)

Examples

			1260 = 21*60 = 6*210. 1395 = 5*9*31 = 15*93. 1530 = 30*51 = 3*510.
		

Crossrefs

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

Programs

  • PARI
    /* Helper function: count number of representations of n as product of numbers >= m whose multiset of digits is D, excluding the trivial representation if m = 0. */
    VampRepCount(n, m=0, D=vecsort(digits(n)))={ if(#D<3, m && (D[1]>=m && vecprod(D)==n || vecsort(digits(n))==D), n >= m^2, my(S=Set(D), c=m && vecsort(digits(n))==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 && c += VampRepCount(n\f, f, C) ); c, n >= m && vecsort(digits(n))==D)}
    is_A144563(n)=VampRepCount(n)>1 \\ M. F. Hasler, Nov 01 2021

Formula

Subsequence of A020342; contains 10*A020342 as a subsequence. - M. F. Hasler, Nov 01 2021

Extensions

Corrected A-number in definition. More terms and examples R. J. Mathar, Jan 05 2009
Terms beyond a(15) by M. F. Hasler, Nov 01 2021

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

Original entry on oeis.org

159, 287, 303, 319, 591, 623, 679, 687, 699, 763, 1135, 1167, 1203, 1243, 1247, 1271, 1351, 1371, 1391, 1631, 2167, 2173, 2231, 2285, 2319, 2359, 2463, 2471, 2495, 2519, 2743, 2779, 2787, 2809, 2863, 2931, 2933, 2991, 3029, 3039, 3503, 4223, 4279, 4287, 4319, 4343, 4411, 4439, 4479, 4487
Offset: 1

Views

Author

Ely Golden, Jan 11 2017

Keywords

Comments

Binary equivalent of A280928.
Subsequence of A278909 as well as A280967. The terms in A278909 and A280967 but not this sequence are given by A280972.

Crossrefs

Programs

  • Python
    from sympy import factorint
    def ok(n):
        f = factorint(n)
        return sum(f.values()) > 1 and sorted(bin(n)[2:]) == sorted("".join(bin(p)[2:]*f[p] for p in f))
    print([k for k in range(5000) if ok(k)]) # Michael S. Branicky, Apr 20 2025
  • SageMath
    def factorbits(x):
        if(x<2):
            return (0,0);
        s=0;t=0
        f=list(factor(x));
        #ensures inequality of numfactorbits(x) and bin(x).count("1") if x is prime
        if((len(f)==1)&(f[0][1]==1)):
            return (0,0);
        for c in range(len(f)):
            s+=bin(f[c][0]).count("1")*f[c][1]
            t+=(bin(f[c][0]).count("0")-1)*f[c][1]
        return (s,t);
    counter=2
    index=1
    while(index<=10000):
        if(factorbits(counter)==(bin(counter).count("1"),bin(counter).count("0")-1)):
            print(str(index)+" "+str(counter))
            index+=1;
        counter+=1;
    

A280972 Numbers that appear in both A278909 and A280967 but not in A280971.

Original entry on oeis.org

765, 1275, 1467, 1503, 1515, 1695, 2910, 2975, 3066, 3423, 4335, 4539, 4605, 4862, 4923, 4947, 4975, 5110, 5295, 5335, 5375, 5559, 5787, 5790, 5835, 5885, 6069, 6123, 6495, 6735, 6783, 7035, 7134, 9195, 9567, 9583, 9645, 9819, 9915, 10087, 10155, 10218, 10234, 10491, 10686, 10959, 10983, 11211
Offset: 1

Views

Author

Ely Golden, Jan 11 2017

Keywords

Comments

Binary equivalent of the sequence representing Numbers that appear in both A176670 and A020342 but not A280928 (currently no members are known).

Examples

			765 = A278909(41) = A280967(32) but is not present in A280971.
		

Crossrefs

A281336 a(n) is the smallest composite number having the same base-n digits (both type and quantity) as its prime factors (with multiplicity).

Original entry on oeis.org

159, 7847, 1135, 83494, 57, 30057, 85, 72646, 1255, 18193, 185, 101212405, 4119, 63791, 88357, 31054582, 489, 4196517, 451, 4598494, 13315, 1012985, 679, 7009758597, 26533, 2884373, 985, 646372334, 1057, 989775393, 1285, 1395750166, 179503, 73294351, 1387
Offset: 2

Views

Author

Hans Havermann, Jan 20 2017

Keywords

Comments

A278981(n) <= A281336(n)

Examples

			In base 2: The digits of 159 (10011111) are the same type and quantity as the total of those in its prime factors, 3 (11) and 53 (110101); 2 zeros, 6 ones.
In base 26: The digits of 26533 (1,13,6,13) are the same type and quantity as the total of those in its prime factors, 13 (13), 13 (13), and 157 (6,1); 1 one, 1 six, 2 thirteens.
		

Crossrefs

A348306 List of Agathokakological Numbers "k": string of digits of the juxtaposition of the prime factors of k has the same length as k but these digits do not appear in k.

Original entry on oeis.org

10, 14, 21, 49, 106, 111, 118, 129, 134, 146, 158, 161, 166, 177, 201, 219, 249, 259, 267, 329, 343, 413, 511, 553, 623, 1011, 1029, 1046, 1077, 1081, 1101, 1106, 1114, 1119, 1138, 1149, 1167, 1186, 1227, 1299, 1318, 1354, 1358, 1363, 1418, 1454, 1466, 1538, 1541, 1546, 1561, 1589, 1591
Offset: 1

Views

Author

Samuel Harkness, Oct 11 2021

Keywords

Comments

Theorem: (See PDF "PROOFS" in Links)
Of Agathokakological Numbers k,
No k have a leading 9.
No k end in 2 or 5.
10 is the only k to end in 0. It is also the only k with 5 as a prime factor.
Can only be square terms when k is of the order 10^m where m is odd.
For k written as a*10^m, k can only be even when 1<=a<1.888...
Empirical observation: When graphed with the log of the n-th term on x axis and the log of the n-th term's value on the y axis a pattern appears with a similar shape for each new power of ten (see figure "LogLogGraph" in Links)
Special cases 28651 = 7*4093 and 65821 = 7*9043 use all digits 0-9 once.
"Agathokakological" is a Greek word meaning "composed of both good and evil." (Merriam-Webster) The composition (prime factorization) of Agathokakological Numbers is both good (same length) and evil (no common digits).

Examples

			158 = 2 * 79 since {2,7,9} do not appear in {1,5,8} and both have 3 digits.
		

Crossrefs

Intersection of A035139 and A109608.
Subsequence of A047201 from n=2.

Programs

  • Mathematica
    q[n_] := Module[{d = IntegerDigits[n], f = FactorInteger[n]}, Length[d] == Plus @@ ((Last[#]*IntegerLength[First[#]]) & /@ f ) && Intersection[d, Join @@ IntegerDigits[f[[;; , 1]]]] == {}]; Select[Range[1600], q] (* Amiram Eldar, Oct 12 2021 *)
  • PARI
    digsf(n) = my(f=factor(n), list=List()); for (k=1, #f~, my(dk=digits(f[k,1])); for (i=1, f[k,2], for (j=1, #dk, listput(list, dk[j])))); Vec(list);
    isokd(m) = my(df=digsf(m), d=digits(m)); (#df == #d) && (#setintersect(Set(df), Set(d)) == 0); \\ Michel Marcus, Oct 11 2021
    
  • Python
    from sympy import factorint
    def ok(n):
        s, f = str(n), factorint(n)
        pfd = set("".join(str(p) for p in f))
        if set(s) & pfd != set(): return False
        return len(s) == sum(len(str(p))*f[p] for p in f)
    print(list(filter(ok, range(1601)))) # Michael S. Branicky, Oct 11 2021
Showing 1-9 of 9 results.