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 21-30 of 35 results. Next

A268620 Numbers whose digital sum is a multiple of 4.

Original entry on oeis.org

0, 4, 8, 13, 17, 22, 26, 31, 35, 39, 40, 44, 48, 53, 57, 62, 66, 71, 75, 79, 80, 84, 88, 93, 97, 103, 107, 112, 116, 121, 125, 129, 130, 134, 138, 143, 147, 152, 156, 161, 165, 169, 170, 174, 178, 183, 187, 192, 196, 202, 206, 211, 215, 219, 220, 224, 228, 233, 237, 242, 246
Offset: 1

Views

Author

Bruno Berselli, Feb 09 2016

Keywords

Comments

a(1498) = 5999 is the smallest term that is congruent to 5 modulo 9.

Crossrefs

Cf. A007953, A061383 (supersequence).
Cf. numbers whose digital sum is a multiple of k: A054683 (k=2), A008585 (k=3), this sequence (k=4), A227793 (k=5).

Programs

  • Magma
    [n: n in [0..250] | IsIntegral(&+Intseq(n)/4)];
  • Maple
    select(t -> convert(convert(t,base,10),`+`) mod 4 = 0, [$1..1000]); # Robert Israel, Feb 09 2016
  • Mathematica
    Select[Range[0, 250], IntegerQ[Total[IntegerDigits[#]]/4] &]

A062182 Harmonic mean of digits is 4.

Original entry on oeis.org

4, 36, 44, 63, 288, 346, 364, 436, 444, 463, 634, 643, 828, 882, 2488, 2666, 2848, 2884, 3366, 3446, 3464, 3636, 3644, 3663, 4288, 4346, 4364, 4436, 4444, 4463, 4634, 4643, 4828, 4882, 6266, 6336, 6344, 6363, 6434, 6443, 6626, 6633, 6662, 8248, 8284
Offset: 1

Views

Author

Vladeta Jovovic, Jun 12 2001

Keywords

Crossrefs

Programs

  • Maple
    filter:= proc(n) local L;
      L:= convert(n,base,10);
      if has(L,0) then return false fi;
      nops(L)/add(1/i,i=L)=4
    end proc:
    select(filter, [$1..10^4]); # Robert Israel, Aug 20 2018
  • Mathematica
    Do[ h = IntegerDigits[n]; If[ Sort[h][[1]] != 0 && Length[h]/Apply[Plus, 1/h] == 4, Print[n]], {n, 1, 10^5}]
    hm4Q[n_]:=DigitCount[n,10,0]==0&&HarmonicMean[IntegerDigits[n]]==4; Select[Range[9000],hm4Q]  (* Harvey P. Dale, Mar 23 2011 *)

Extensions

More terms from Henry Bottomley, Jul 25 2001

A062183 Numbers such that harmonic mean of digits is 5.

Original entry on oeis.org

5, 55, 555, 5555, 26999, 28888, 29699, 29969, 29996, 33999, 34688, 34868, 34886, 36488, 36666, 36848, 36884, 38468, 38486, 38648, 38684, 38846, 38864, 39399, 39939, 39993, 43688, 43868, 43886, 44488, 44666, 44848, 44884, 46388, 46466
Offset: 1

Views

Author

Vladeta Jovovic, Jun 12 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Do[ h = IntegerDigits[n]; If[ Sort[h][[1]] != 0 && Length[h]/Apply[Plus, 1/h] == 5, Print[n]], {n, 1, 10^6}]
    Select[Range[50000],HarmonicMean[IntegerDigits[#]]==5&] (* Harvey P. Dale, Sep 27 2018 *)

Extensions

More terms from Robert G. Wilson v, Aug 08 2001

A175762 Primes with an arithmetic mean of digits which is also prime.

Original entry on oeis.org

2, 3, 5, 7, 13, 19, 31, 37, 59, 73, 1061, 1151, 1223, 1289, 1487, 1511, 1559, 1601, 1667, 1847, 1973, 1999, 2099, 2141, 2213, 2297, 2411, 2459, 2477, 2549, 2657, 2693, 2729, 2819, 2837, 2909, 2927, 2963, 3023, 3041, 3089, 3203, 3221, 3359, 3449, 3467, 3539, 3557
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 29 2010

Keywords

Examples

			a(10)=73 because (7+3)/2=5=prime. a(12)=1151 because (1+1+5+1)/4=2=prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[500]],PrimeQ[Mean[IntegerDigits[#]]]&] (* Harvey P. Dale, Jan 16 2013 *)

Formula

{A000040(i): A007605(i)/A097944(i) in A000040}.

Extensions

Corrected (59 inserted, 1061 inserted etc.) by R. J. Mathar, Sep 24 2010

A190760 Product of digits is divisible by number of digits.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32, 34, 36, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 52, 54, 56, 58, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 72, 74, 76, 78, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 92, 94, 96, 98, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 113, 116, 119
Offset: 1

Views

Author

Kyle Stern, May 18 2011

Keywords

Comments

Almost all numbers are in this sequence: there are at least n - 1.125 n^0.95... elements up to n, where the exponent is log(9)/log(10). - Charles R Greathouse IV, May 20 2011

Examples

			3*8*2 = 48 and 48 is divisible by the number of digits, 3, so 382 is included.
		

Crossrefs

Programs

  • Maple
    A190760 := proc(n) option remember: local k: if(n=1)then return 0: fi: for k from procname(n-1)+1 do if(mul(d,d=convert(k,base,10)) mod length(k) = 0)then return k: fi: od: end: seq(A190760(n),n=1..100); # Nathaniel Johnston, May 19 2011

A306520 Numbers k with property that the arithmetic mean of any subset of its digits is an integer.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 15, 17, 19, 20, 22, 24, 26, 28, 31, 33, 35, 37, 39, 40, 42, 44, 46, 48, 51, 53, 55, 57, 59, 60, 62, 64, 66, 68, 71, 73, 75, 77, 79, 80, 82, 84, 86, 88, 91, 93, 95, 97, 99, 111, 117, 135, 153, 159, 171, 177, 195
Offset: 1

Views

Author

R. J. Cano, Feb 21 2019

Keywords

Comments

This sequence is different from A061383. Here digits in k must have all the same parity, otherwise the average of at least a pair of digits wouldn't be an integer. Note that for every 2-digit term in A061383 both digits have the same parity. But not every number whose digits have all the same parity (sequence A059708) belongs here.

Examples

			17 is in this sequence because the set of digits (1,7) has an integer average: 4.
159 and 195 are in this sequence because the sets of digits (1,5), (1,9), (5,9), and (1,5,9) all have integer averages, respectively: 3, 5, 7, and 5.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0,200],AllTrue[Mean/@Subsets[IntegerDigits[#],{2, IntegerLength[ #]}],IntegerQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 09 2020 *)
  • PARI
    firstTerms_vec(n)={my(v=vector(n),c,t,w:list,h);for(i=1,+oo,w=List();forsubset(i,k,listput(w,k));listpop(w,1);forvec(j=vector(i,z,[(z==1)&&(i>1),9]),h=j[1]%2;for(l=2,#j,if((j[l]%2)!=h,next(2)));for(k=1,#w,t=vecextract(j,w[k]);if(vecsum(t)%(#w[k]),next(2)));v[c++]=fromdigits(j);if(c==n,return(v))))}
    
  • PARI
    isok(m,{B=10})={my(w=digits(m,B));forsubset(#w,y,if(y!=Vecsmall([]),if(vecsum(vecextract(w,y))%(#y),return(0)),next));1}

Formula

Apparently a(158+n) = A010785(35+n).

A335743 Keep the first two digits of a(n) and insert a dot between them; this is now the arithmetic mean (truncated after the first decimal) of the digits used so far in the sequence. Lexicographically earliest sequence of distinct positive terms with this property.

Original entry on oeis.org

45, 30, 38, 301, 306, 307, 305, 308, 304, 318, 303, 309, 316, 302, 2900, 2901, 2910, 3019, 3009, 3018, 3027, 3028, 3008, 3029, 3007, 3036, 3037, 3017, 3038, 3016, 3039, 3006, 3045, 3046, 3026, 3047, 3025, 3048, 3015, 3049, 3005, 3054, 3055, 3035, 3056, 3034, 3057, 3024, 3058, 3014, 3059, 3004, 3063
Offset: 1

Views

Author

Eric Angelini and Carole Dubois, Jul 02 2020

Keywords

Comments

The sequence starts with a(1) = 45 as any a(1) < 45 would not produce an infinite sequence.

Examples

			a(1) = 45; inserting a dot between the first two digits produces 4.5; this is now the arithmetic mean (AM) of the digits used so far in the sequence as (4 + 5)/2 = 9/2 = 4.5 (and 4.5 is 45 with a dot);
a(2) = 30; inserting a dot between the first two digits produces 3.0; this is the AM of the digits used so far in the sequence as (4 + 5 + 3 + 0)/4 = 12/4 = 3 (and 3 is 30 with a dot);
a(3) = 38; inserting a dot between the first two digits produces 3.8; this is the AM of the digits used so far (when truncated after the first decimal) as (4 + 5 + 3 + 0 + 3 + 8)/6 = 23/6 = 3.83333... which produces 38, and 3.8 is 38 with a dot);
a(4) = 301; inserting a dot between the first two digits produces 3.0; this is the AM of the digits used so far as (4 + 5 + 3 + 0 + 3 + 8 + 3 + 0 + 1)/9 = 27/9 = 3 [and 3 is 30 with a dot, this 30 being formed by the first two digits of a(4)];
a(5) = 306; inserting a dot between the first two digits produces 3.0; this is the AM of the digits used so far as (4 + 5 + 3 + 0 + 3 + 8 + 3 + 0 + 1 + 3 + 0 + 6)/12 = 36/12 = 3 (and 3 is 30 with a dot, this 30 being formed by the first two digits of a(5)]);
a(6) = 307; inserting a dot between the first two digits produces 3.0; this is the AM of the digits used so far (truncated after the first decimal) as (4 + 5 + 3 + 0 + 3 + 8 + 3 + 0 + 1 + 3 + 0 + 6 + 3 + 0 + 7)/15 = 46/15 = 3.0666... which produces 30, this 30 being formed by the first two digits of a(6)]; etc.
		

Crossrefs

Cf. A061383 (arithmetic mean of digits is an integer).

A364606 Numbers k such that the average digit of 2^k is an integer.

Original entry on oeis.org

0, 1, 2, 3, 6, 13, 16, 26, 46, 51, 56, 73, 122, 141, 166, 313, 383
Offset: 1

Views

Author

Jon E. Schoenfield, Jul 29 2023

Keywords

Examples

			2^26 = 67108864 is an 8-digit number; its average digit is (6+7+1+0+8+8+6+4)/8 = 40/8 = 5, an integer, so 26 is a term.
		

Crossrefs

Programs

  • Maple
    q:= n-> (l-> irem(add(i, i=l), nops(l))=0)(convert(2^n, base, 10)):
    select(q, [$0..400])[];  # Alois P. Heinz, Jul 29 2023
  • Mathematica
    Select[Range[0, 2^12], IntegerQ@ Mean@ IntegerDigits[2^#] &] (* Michael De Vlieger, Jul 29 2023 *)
  • PARI
    isok(k) = my(d=digits(2^k)); !(vecsum(d) % #d); \\ Michel Marcus, Jul 29 2023
    
  • Python
    from itertools import count, islice
    from gmpy2 import mpz, digits
    def A364606_gen(startvalue=0): # generator of terms >= startvalue
        m = mpz(1)<A364606_list = list(islice(A364606_gen(),10)) # Chai Wah Wu, Jul 31 2023

Formula

{ k : A001370(k) mod A034887(k) = 0 }.

A383304 Nonnegative integers whose difference between the largest and smallest digits is equal to the arithmetic mean of its digits.

Original entry on oeis.org

0, 13, 26, 31, 39, 62, 93, 123, 132, 144, 213, 225, 231, 246, 252, 264, 267, 276, 288, 312, 321, 348, 369, 384, 396, 414, 426, 438, 441, 462, 483, 522, 624, 627, 639, 642, 672, 693, 726, 762, 828, 834, 843, 882, 936, 963, 1133, 1223, 1232, 1313, 1322, 1331, 1344, 1434, 1443
Offset: 1

Views

Author

Stefano Spezia, Apr 22 2025

Keywords

Examples

			144 is a term since 4 - 1 = 3 = (1 + 4 + 4)/3.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0,1500], Max[d=IntegerDigits[#]]-Min[d]==Mean[d] &]
  • Python
    def ok(n): return sum(d:=list(map(int, str(n)))) == (max(d) - min(d))*len(d)
    print([k for k in range(1500) if ok(k)]) # Michael S. Branicky, Apr 23 2025

A061546 Harmonic mean of digits is 7.

Original entry on oeis.org

7, 77, 777, 7777, 77777, 777777, 3999999, 4688999, 4689899, 4689989, 4689998, 4698899, 4698989, 4698998, 4699889, 4699898, 4699988, 4868999, 4869899, 4869989, 4869998, 4886999, 4888888, 4889699, 4889969, 4889996, 4896899
Offset: 1

Views

Author

Vladeta Jovovic, Jun 13 2001

Keywords

Examples

			6666999 is a term since 7/(1/6+1/6+1/6+1/6+1/9+1/9+1/9)=7.
		

Crossrefs

Programs

  • Mathematica
    Do[ h = IntegerDigits[n]; If[ Sort[h][[1]] != 0 && Length[h]/Apply[Plus, 1/h] == 7, Print[n]], {n, 1, 10^6}]

Extensions

More terms from Robert G. Wilson v, Aug 08 2001
Previous Showing 21-30 of 35 results. Next