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.

A061383 Arithmetic mean of 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, 102, 105, 108, 111, 114, 117, 120, 123, 126, 129
Offset: 0

Views

Author

Amarnath Murthy, May 03 2001

Keywords

Comments

A004426(a(n)) = A004427(a(n)). - Reinhard Zumkeller, May 27 2010
A175688 is a subsequence; complement of A180157; A180160(a(n))=0. - Reinhard Zumkeller, Aug 15 2010
It seems "obvious" that n log n << a(n) < n log n; is this true? - Charles R Greathouse IV, Feb 06 2013

Examples

			123 is a term as the arithmetic mean is (1+2+3)/3 = 2.
		

Crossrefs

Programs

  • Haskell
    a061383 n = a061383_list !! (n-1)
    a061383_list = filter (\x -> mod (a007953 x) (a055642 x) == 0) [0..]
    -- Reinhard Zumkeller, Jun 18 2013
    
  • Magma
    [0] cat [n: n in [1..130] | IsZero(&+Intseq(n) mod #Intseq(n))];  // Bruno Berselli, Jun 30 2011
    
  • Magma
    [0] cat [n: n in [1..130] | IsIntegral(&+Intseq(n)/#Intseq(n))];   // Bruno Berselli, Feb 09 2016
    
  • Mathematica
    Select[Range[0,129],IntegerQ[Total[x=IntegerDigits[#]]/Length[x]] &] (* Jayanta Basu, May 17 2013 *)
    Select[Range[0,200],IntegerQ[Mean[IntegerDigits[#]]]&] (* Harvey P. Dale, Dec 31 2022 *)
  • PARI
    is(n)=my(v=digits(n));sum(i=1,#v,v[i])%#v==0 \\ Charles R Greathouse IV, Feb 06 2013
    
  • Python
    def ok(n): return n == 0 or sum(d:=list(map(int, str(n))))%len(d) == 0
    print([k for k in range(130) if ok(k)]) # Michael S. Branicky, Apr 23 2025

A175688 Numbers k with property that arithmetic mean of its digits is both an integer and one of the digits of k.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 44, 55, 66, 77, 88, 99, 102, 111, 120, 123, 132, 135, 147, 153, 159, 174, 195, 201, 204, 210, 213, 222, 231, 234, 240, 243, 246, 258, 264, 285, 306, 312, 315, 321, 324, 333, 342, 345, 351, 354, 357, 360, 369, 375, 396, 402
Offset: 1

Views

Author

Claudio Meller, Aug 09 2010

Keywords

Comments

Subsequence of A061383.
A180160(a(n)) = 0. - Reinhard Zumkeller, Aug 15 2010

Examples

			135 is in the list because (1+3+5)/3 = 3 and 3 is a digit of 135.
		

Crossrefs

Programs

  • Haskell
    a175688 n = a175688_list !! (n-1)
    a175688_list = filter f [0..] where
       f x = m == 0 && ("0123456789" !! avg) `elem` show x
             where (avg, m) = divMod (a007953 x) (a055642 x)
    -- Reinhard Zumkeller, Jun 18 2013
  • Mathematica
    idQ[n_]:=Module[{idn=IntegerDigits[n],m},m=Mean[idn];IntegerQ[m] && MemberQ[idn,m]]; Select[Range[0,500],idQ] (* Harvey P. Dale, Jun 10 2011 *)

Extensions

Edited by Reinhard Zumkeller, Aug 13 2010

A180157 Arithmetic mean of digits is not an integer.

Original entry on oeis.org

10, 12, 14, 16, 18, 21, 23, 25, 27, 29, 30, 32, 34, 36, 38, 41, 43, 45, 47, 49, 50, 52, 54, 56, 58, 61, 63, 65, 67, 69, 70, 72, 74, 76, 78, 81, 83, 85, 87, 89, 90, 92, 94, 96, 98, 100, 101, 103, 104, 106, 107, 109, 110, 112, 113, 115, 116, 118, 119, 121, 122, 124, 125
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 15 2010

Keywords

Comments

Complement of A061383; A180160(a(n)) > 0;
A004426(a(n)) <> A004427(a(n)).
It seems 'obvious' that a(n) ~ n; is this true? - Charles R Greathouse IV, Feb 06 2013

Crossrefs

Programs

  • Mathematica
    Select[Range[200],!IntegerQ[Mean[IntegerDigits[#]]]&]  (* Harvey P. Dale, Mar 27 2011 *)
  • PARI
    is(n)=my(v=digits(n));sum(i=1,#v,v[i])%#v>0 \\ Charles R Greathouse IV, Feb 06 2013

A123522 Not of the form n + [log_10 n].

Original entry on oeis.org

0, 10, 101, 1002, 10003, 100004, 1000005, 10000006, 100000007, 1000000008, 10000000009, 100000000010, 1000000000011, 10000000000012, 100000000000013, 1000000000000014, 10000000000000015, 100000000000000016
Offset: 0

Views

Author

Ron R. King, Nov 10 2006

Keywords

Comments

Smallest number such that (sum of digits) mod (number of digits) = n in decimal representation. - Reinhard Zumkeller, Aug 15 2010
Consider a word on the alphabet {0,1,2,...,9} that has length of 10^a(n). The expected number of occurrences of a pattern (contiguous subsequence) p_1,p_2,...p_n for all such words is 1. - Geoffrey Critzer, Feb 03 2012

Programs

  • Magma
    [10^n + n -1: n in [0..30]]; // G. C. Greubel, Nov 30 2017
  • Mathematica
    Table[10^n + n - 1, {n, 0, 20}]  (* Geoffrey Critzer, Feb 03 2012 *)
    LinearRecurrence[{12,-21,10},{0,10,101},20] (* Harvey P. Dale, Jul 20 2021 *)
  • PARI
    for(n=0,30, print1(10^n + n -1, ", ")) \\ G. C. Greubel, Nov 30 2017
    

Formula

a(n) = 10^n + n - 1.
From Reinhard Zumkeller, Aug 15 2010: (Start)
A180160(a(n)) = n and A180160(m) <> n for m < a(n).
A007953(a(n)) = n; A055642(a(n)) = n + 1. (End)
From R. J. Mathar, Aug 15 2010: (Start)
G.f.: x*(-10+19*x) / ( (10*x-1)*(x-1)^2 ).
a(n) = 12*a(n-1) -21*a(n-2) +10*a(n-3). (End)

Extensions

a(0) and terms beyond a(9) from Reinhard Zumkeller, Aug 15 2010

A374097 a(n) = A196563(n)*A196564(n).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
Offset: 0

Views

Author

Paolo Xausa, Jun 28 2024

Keywords

Comments

More than the usual number of terms are shown in order to distinguish this sequence from A180160, from which it first differs at n = 100.

Crossrefs

Cf. A055642, A059708 (positions of zeros), A180160, A196563, A196564.

Programs

  • Mathematica
    A374097[n_] := #*(IntegerLength[n] - #) & [Total[Mod[IntegerDigits[n], 2]]];
    Array[A374097, 120, 0]

A326746 a(n) = (sum of digits of n) mod (sum of digits of n+1).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 2, 6, 7, 8, 9, 10, 11, 12, 13, 14, 1, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 8, 9, 10, 11, 12, 13, 14, 15, 16, 8, 9, 10
Offset: 0

Views

Author

Scott R. Shannon, Oct 19 2019

Keywords

Comments

For n > 100 the maximum value of a(n) increases by 1 a total of nine times for every order-of-magnitude increase of n; for n up to 10^10 the largest value of a(n) is 89.
The frequency of occurrence for the values of a(n) for large values of n has an interesting distribution - it is a bell-shaped curve but with large increases for a(n) = 8, and a smaller increase for a(n) = 17. The value a(n) = 8 is likely the most common value as every time n increases by 100 the value of a(n) goes through ten smaller cycles, and 8 appears to be the only value that is present in all ten cycles. The reason a(n) = 17 also appears more often is not clear, although the distribution for n up to 10^10 also shows a slight increase in the number of occurrences for a(n) = 26, suggesting that a(n) values of the form a(n) = 8 + 9 * k, where k >= 0, occur more frequently than one would predicted from the surrounding bell-curve distribution.
The sequence is unbounded because a(10^k-2) = 9*k-1 for k>0. - Giovanni Resta, Oct 19 2019

Examples

			a(1) = sum of digits of 1 mod sum of digits of 2 = 1 mod 2 = 1.
a(9) = sum of digits of 9 mod sum of digits of 10 = 9 mod 1 = 0.
a(38) = sum of digits of 38 mod sum of digits of 39 = 11 mod 12 = 11.
a(39) = sum of digits of 39 mod sum of digits of 40 = 12 mod 4 = 0.
		

Crossrefs

Programs

  • Mathematica
    sod[n_] := Plus @@ IntegerDigits@ n; a[n_] := Mod[sod[n], sod[n+1]]; Array[a, 100, 0] (* Giovanni Resta, Oct 19 2019 *)
  • PARI
    a(n) = sumdigits(n) % sumdigits(n+1); \\ Michel Marcus, Oct 19 2019
Showing 1-6 of 6 results.