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.

Previous Showing 81-90 of 90 results.

A213689 Smallest magic sum of an order-n magic square composed of consecutive Smith numbers.

Original entry on oeis.org

252416863614, 10949070196804, 8719491322, 3873, 5551, 6496, 9179, 15681, 20978, 26062, 28301, 35936, 50560, 55330, 66877, 88738, 94465, 111840, 128860, 177659, 179929, 230580, 261107, 275220, 300070, 361843, 395338, 457169, 446645, 505470, 560168
Offset: 3

Views

Author

Max Alekseyev, Jun 18 2012

Keywords

Examples

			3 X 3 magic square:
  84138954584 84138954498 84138954532
  84138954486 84138954538 84138954590
  84138954544 84138954578 84138954492
4 X 4 magic square:
  2737267549028 2737267549166 2737267549330 2737267549280
  2737267549305 2737267549265 2737267549134 2737267549100
  2737267549186 2737267549105 2737267549300 2737267549213
  2737267549285 2737267549268 2737267549040 2737267549211
		

Crossrefs

A225133 Minimal index of order n Stanley's antimagic square composed of Smith numbers.

Original entry on oeis.org

4, 143, 669, 2088, 8318, 30885, 87643
Offset: 1

Views

Author

Natalia Makarova, Apr 29 2013

Keywords

Comments

Stanley antimagic square of index d and order n is an n X n matrix where the sum of any n matrix elements in pairwise distinct rows and pairwise distinct columns equals d.

Examples

			Examples of order n Stanley's antimagic squares with minimal index S composed of Smith numbers:
.
n=2, S=143
  22  58
  85 121
.
For n=3, S=669 we have:
   22  58 202
   85 121 265
  346 382 526
Here 22+121+526 = 22+265+382 = 58+265+346 = 58+85+526 = 202+121+346 = 202+85+382 = 669.
.
n=4, S=2088
   85  94 121 517
  346 355 382 778
  526 535 562 958
  654 663 690 1086
.
n=5, S=8318 (author V. Pavlovsky)
    58  121  382  562 1111
   202  265  526  706 1255
   454  517  778  958 1507
  1858 1921 2182 2362 2911
  3802 3865 4126 4306 4855
.
n=6, S=30885
    319   346  1642  1678  1966  3226
    535   562  1858  1894  2182  3442
   1255  1282  2578  2614  2902  4162
   3595  3622  4918  4954  5242  6502
   4279  4306  5602  5638  5926  7186
  13639 13666 14962 14998 15286 16546
.
n=7, S=87643 (author J. K. Andersen)
    454   634  1858  2614  4054  4414 16474
   1642  1822  3046  3802  5242  5602 17662
   2038  2218  3442  4198  5638  5998 18058
   5674  5854  7078  7834  9274  9634 21694
   5935  6115  7339  8095  9535  9895 21955
  20362 20542 21766 22522 23962 24322 36382
  24214 24394 25618 26374 27814 28174 40234
		

Crossrefs

A235812 a(n) is the start of the earliest run of n numbers such that the sum of their digits is equal to the sum of the digits of their prime factors.

Original entry on oeis.org

2, 2, 2, 2, 1458855, 1790478, 429990136, 4475873320, 1979414080360
Offset: 1

Views

Author

Giovanni Resta, Jan 16 2014

Keywords

Comments

This sequence takes into account both primes and Smith numbers (A006753).
a(10) > 5*10^12.

Examples

			The four numbers 2, 3, 4, 5 are either prime (2, 3, 5) or Smith (4) numbers. In any case, the sum of their digits is equal to the sum of their prime factors (counted with multiplicity), hence a(1) = a(2) = a(3) = a(4) = 2.
		

Crossrefs

A337294 Composite numbers k that are Smith numbers in a record number of bases 1 < b <= k.

Original entry on oeis.org

4, 10, 15, 27, 42, 60, 72, 78, 174, 204, 222, 378, 438, 663, 1352, 1446, 2022, 2526, 2598, 3462, 4038, 4542, 6054, 12102, 22182, 30336, 35432, 39318, 44358, 55446, 72582, 90726, 99798, 110886, 120966, 157254, 181446, 235878, 288294, 332646, 399174, 432438, 665286
Offset: 1

Views

Author

Amiram Eldar, Aug 21 2020

Keywords

Comments

Values of A002808 at the indices of records of A060209.
The corresponding number of bases are 0, 1, 2, 3, 4, 5, 6, 7, 9, 10, 14, 15, 19, 20, 21, 22, 27, 29, 31, 33, 35, 40, 48, 59, 66, 67, 71, 76, 80, 81, 88, 97, 98, 101, 105, 118, 119, 130, 131, 152, 156, 167, 187, ...

Examples

			a(1) = 4 since it is the least composite number and it is not a Smith number in any base 1 < b <= 4.
a(2) = 10 since it is the least number that is a Smith number in any base 1 < b <= 10: 10 = 2 * 5 is, 22_4 = 2_4 * 11_4 in base 4, and 2 + 2 = 2 + (1 + 1) = 4.
		

Crossrefs

Similar sequences: A107129, A330813.

Programs

  • Mathematica
    digSum[n_, b_] := Plus @@ IntegerDigits[n, b]; smithCount[n_] := If[! CompositeQ[n], 0, Module[{c = 0, f = FactorInteger[n]}, p = f[[;; , 1]]; e = f[[;; , 2]]; Do[If[Total[e*(digSum[#, b] & /@ p)] == digSum[n, b], c++], {b, 2, n}]; c]]; seq = {}; cmax = -1; Do[If[CompositeQ[n] && (c = smithCount[n]) > cmax, cmax = c; AppendTo[seq, n]], {n, 1, 666}]; seq

A351618 Numbers that are both Zuckerman numbers and Smith numbers.

Original entry on oeis.org

4, 1111, 3168, 7119, 31488, 141184, 698112, 1169316, 1621248, 1687392, 1938816, 1967112, 12469248, 12822912, 14112672, 16616448, 41484288, 79817472, 116149248, 121911264, 128894976, 163319328, 166491936, 193916916, 218431488, 247984128, 798142464, 817883136
Offset: 1

Views

Author

Bernard Schott, Feb 15 2022

Keywords

Examples

			3168 is a term since it is a Zuckerman number (3*1*6*8) = 144 is a divisor of 3168 and a Smith number (3168 = 2*2*2*2*2*3*3*11 and 2+2+2+2+2+3+3+1+1 = 3+1+6+8).
		

Crossrefs

Intersection of A007602 and A006753.
Cf. A334527.

Programs

  • Mathematica
    digSum[n_] := Plus @@ IntegerDigits[n]; smithQ[n_] := CompositeQ[n] && Plus @@ (Last@# * digSum[First@#] & /@ FactorInteger[n]) == digSum[n]; zuckQ[n_] := (prodig = Times @@ IntegerDigits[n]) > 0 && Divisible[n, prodig]; Select[Range[10^6], zuckQ[#] && smithQ[#] &] (* Amiram Eldar, Feb 15 2022 *)
  • PARI
    isok(m) = my(d=digits(m)); if (vecmin(d) && !(m % vecprod(d)) && !isprime(m) , my(f=factor(m)); sum(k=1, #f~, sumdigits(f[k,1])*f[k,2]) == vecsum(d)); \\ Michel Marcus, Feb 15 2022

Extensions

More terms from Amiram Eldar, Feb 15 2022

A375724 a(n) is the first Smith number with at least n digits.

Original entry on oeis.org

4, 22, 121, 1086, 10086, 100066, 1000165, 10000426, 100000165, 1000000165, 10000000165, 100000000498, 1000000000066, 10000000000615, 100000000000786, 1000000000000426, 10000000000000246, 100000000000000642, 1000000000000000462, 10000000000000000246, 100000000000000000282, 1000000000000000000966
Offset: 1

Views

Author

Robert Israel, Aug 25 2024

Keywords

Comments

a(n) is the least composite k >= 10^(n-1) such that the sum of the decimal digits of k is equal to the sum of the decimal digits of the prime factors of k, counted with multiplicity.
Almost certainly a(n) has exactly n digits, but "at least" is included in the Name since we have no proof of that.

Examples

			a(5) = 10086 because 10086 has digit-sum 15 and 10086 = 2 * 3 * 41^2 with 2 + 3 + (4 + 1) + (4 + 1) = 15, and no k from 10000 to 10085 works.
		

Crossrefs

Cf. A006753.

Programs

  • Maple
    f:= proc(n) local t,x;
        for x from 10^(n-1) do
          if isprime(x) then next fi;
          if convert(convert(x,base,10),`+`) = add(t[2]*convert(convert(t[1],base,10),`+`), t = ifactors(x)[2]) then return x fi;
        od
    end proc:
    map(f, [$1..30]);
  • Python
    from sympy import factorint
    from itertools import count
    def sd(n): return sum(map(int, str(n)))
    def is_smith(n):
        f = factorint(n)
        return sum(f[p] for p in f) > 1 and sd(n) == sum(sd(p)*f[p] for p in f)
    def a(n): return next(k for k in count(10**(n-1)) if is_smith(k))
    print([a(n) for n in range(1, 23)]) # Michael S. Branicky, Aug 25 2024

A375727 a(n) is the least number that is a Smith number in all bases 2 to n but not in base n+1.

Original entry on oeis.org

15, 475, 1023, 222, 1924475, 26910204, 191999912, 240365505, 10127638898, 15357419170
Offset: 2

Views

Author

Robert Israel, Aug 25 2024

Keywords

Examples

			a(3) = 475 = 5^2 * 19.
In base 2, 475 = 111011011_2 with digit sum 7, 5 = 101_2 with digit sum 2, 19 = 10011_2 with digit sum 3, and 7 = 2 * 2 + 3.
In base 3, 475 = 122121_3 with digit sum 9, 5 = 12_3 with digit sum 3, 19 = 201_3 with digit sum 3, and 9 = 2 * 3 + 3.
In base 4, 475 = 13123_4 with digit sum 10, 5 = 11_4 with digit sum 2, 19 = 103_4 with digit sum 4, and 10 <> 2 * 2 + 4.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local F, t,b;
         if isprime(n) then return 0 fi;
         F:= ifactors(n)[2];
         for b from 2 while convert(convert(n,base,b),`+`) = add(t[2]*convert(convert(t[1],base,b),`+`), t = F) do od:
         if b = 2 then 0 else b-1 fi
    end proc:
    N:= 7: # for a(2) .. a(N)
    V:= Vector(N): count:= 0:
    for n from 4 while count < N-1 do
      v:= f(n);
      if v > 0 and V[v] = 0 then V[v]:= n; count:= count+1 fi;
    od:
    convert(V[2..N],list);
  • PARI
    smith(k) = {my(f = factor(k), p = f[,1], e = f[,2], b = 2); while(sumdigits(k, b) == sum(i = 1, #p, e[i] * sumdigits(p[i], b)), b++); b-1;}
    lista(len) = {my(m = len + 1, v = vector(m), c = 0, i); forcomposite(k = 1, , i = smith(k); if(i <= m && v[i] == 0, c++; v[i] = k; if(c == m, break))); vecextract(v, "^1");} \\ Amiram Eldar, Aug 29 2024
  • Python
    from sympy.ntheory import digits
    from sympy import factorint, isprime
    from itertools import count, islice
    def sd(n, base=10): return sum(digits(n, base)[1:])
    def f(n, factors):
        for b in count(2):
            if sd(n, base=b) != sum(sd(p, base=b)*factors[p] for p in factors):
                break
        return b-1
    def agen(): # generator of terms
        adict, n = dict(), 2
        for k in count(1):
            if isprime(k): continue
            v = f(k, factorint(k))
            if v not in adict: adict[v] = k
            while n in adict: yield adict[n]; n += 1
    print(list(islice(agen(), 4))) # Michael S. Branicky, Aug 25 2024
    

Extensions

a(8)-a(9) from Michael S. Branicky, Aug 26 2024
a(10)-a(11) from Amiram Eldar, Aug 29 2024

A376157 Numbers k such that the sum of the digits of k equals the sum of its prime factors plus the sum of the multiplicities of each prime factor.

Original entry on oeis.org

4, 25, 36, 54, 125, 192, 289, 297, 343, 392, 448, 676, 756, 1089, 1536, 1764, 1936, 2646, 2888, 3872, 4802, 4860, 6174, 6250, 6776, 6860, 7290, 7488, 7680, 8750, 8775, 9408, 9747, 10648, 14739, 15309, 16848, 18432, 18865, 21296, 22869, 25725, 29988, 33750, 33957
Offset: 1

Views

Author

Jordan Brooks, Sep 12 2024

Keywords

Examples

			For k = 54, its prime factorization is 2^1*3^3: 5+4 = 2+1+3+3 = 9.
For k = 756, its prime factorization is 2^2*3^3*7^1: 7+5+6 = 2+2+3+3+7+1 = 18.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[34000], DigitSum[#]==Total[Flatten[FactorInteger[#]]] &] (* Stefano Spezia, Sep 14 2024 *)
  • PARI
    isok(k)={my(f=factor(k)); vecsum(f[,1]) + vecsum(f[,2]) == sumdigits(k)} \\ Andrew Howroyd, Sep 26 2024
  • Python
    from sympy.ntheory import factorint
    c = 2
    while c < 10000:
        charsum = 0
        for char in str(c):
            charsum += int(char)
        pf = factorint(c)
        cand = 0
        for p in pf.keys():
            cand += p
            cand += pf[p]
        if charsum == cand:
            print(c)
            print(pf)
        c += 1
    

Formula

{ k : A007953(k) = A008474(k) }.

A382922 Numbers k such that Fibonacci(k) is a Smith number.

Original entry on oeis.org

31, 77, 231, 354, 523, 535, 631, 819, 827, 830, 991, 1234
Offset: 1

Views

Author

Shyam Sunder Gupta, Apr 08 2025

Keywords

Examples

			31 is a term since Fibonacci(31) = 1346269 = 557 * 2417, and 1346269 is a Smith number (1 + 3 + 4 + 6 + 2 + 6 + 9 = 5 + 5 + 7 + 2 + 4 + 1 + 7).
		

Crossrefs

Extensions

a(5)-a(12) from Amiram Eldar, Apr 09 2025

A385932 Composite numbers m such that the sum of digits of m divides the sum of digits of prime factors of m (counted with multiplicity).

Original entry on oeis.org

4, 10, 22, 27, 32, 42, 58, 60, 70, 85, 94, 100, 104, 121, 152, 166, 200, 202, 231, 265, 274, 315, 316, 319, 322, 330, 342, 346, 355, 361, 378, 382, 391, 402, 406, 430, 438, 450, 454, 483, 510, 517, 526, 535, 540, 562, 576, 588, 602, 610, 612, 627, 632, 634, 636, 645, 648
Offset: 1

Views

Author

Stefano Spezia, Jul 12 2025

Keywords

Comments

Equivalently, numbers m such that A007953(m) | A118503(m).
Union of the k-Smith numbers for all the positive integers k.

Examples

			10 = 2*5 is a term since it is a 7-Smith number: 1 + 0 = 1 | 7 = 2 + 5;
60 = 2^2*3*5 is term since it is a 2-Smith number: 6 + 0 = 6 | 12 = 2 + 2 + 3 + 5;
382 = 2*191 is a term since it is a Smith number (k=1): 3 + 8 + 2 = 13 | 13 = 2 + 1 + 9 + 1;
635 = 5*127 is not a term since 6 + 3 + 5 = 14 does not divide 15 = 5 + 1 + 2 + 7.
		

References

  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, Exercise 3.1.14 and 3.1.16 on pages 84-85.

Crossrefs

Programs

  • Mathematica
    fQ[n_]:=!PrimeQ[n] && n>1 && Divisible[Total[Flatten[IntegerDigits[Table[#[[1]], {#[[2]]}]] & /@ FactorInteger[n]]], Total[IntegerDigits[n]]]; Select[ Range@ 650, fQ]
Previous Showing 81-90 of 90 results.