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

A247796 From right to left in decimal representation of n: replace each maximal set of adjacent digits with their sum, if this sum is less than 10.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 19, 2, 3, 4, 5, 6, 7, 8, 9, 28, 29, 3, 4, 5, 6, 7, 8, 9, 37, 38, 39, 4, 5, 6, 7, 8, 9, 46, 47, 48, 49, 5, 6, 7, 8, 9, 55, 56, 57, 58, 59, 6, 7, 8, 9, 64, 65, 66, 67, 68, 69, 7, 8, 9, 73, 74, 75, 76, 77
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 08 2014

Keywords

Examples

			7654321: 7654[321] -> 7654[3+2+1] -> 76546 -> 76[54]6 -> 76[5+4]6 -> 7696 = a(7654321);
1234567: 123[45]67 -> 123[4+5]67 -> 123967 -> [123]967 -> [1+2+3]967 -> 6967 = a(1234567);
1111111: [1111111] -> [1+1+1+1+1+1+1] -> 7 = a(1111111);
a(7777777) = 7777777;
90909: 909[09] -> 909[0+9] -> 9099 -> 9[09]9 -> 9[0+9]9 -> 999 = a(90909);
20202: [20202] -> [2+0+2+0+2] -> 6 = a(20202).
		

Crossrefs

Programs

  • Haskell
    a247796 = f 0 where
       f s 0 = s
       f s x = if s + d < 10 then f (s + d) x' else (f d x') * 10 + s
               where (x', d) = divMod x 10
    
  • PARI
    A247796(n,d=digits(n))={forstep(k=#d,2,-1,if(d[k-1]+d[k]<10, d[k-1]+=d[k]; d=d[^k]));fromdigits(d)} /* or: (about 10% faster) */
    A247796(n,u=1)={until(n<10*u*=10,my(m=n\u);while(m>9&&sumdigits(m%100)<10, m=vecsum(divrem(m,10));n=m*u+n%u));n} \\ Trying to reduce the number of redefinitions of n yields slower code. M. F. Hasler, Jan 29 2018

Formula

a(n) <= n; a(A248013(n)) = A248013(n); a(A248014(n)) < A248014(n);
a(n) = a(a(n)) = a(A004719(n)) = a(n * 10^k).

Extensions

Edited by M. F. Hasler, Jan 29 2018

A248014 Numbers m such that A247796(m) < m.

Original entry on oeis.org

10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 30, 31, 32, 33, 34, 35, 36, 40, 41, 42, 43, 44, 45, 50, 51, 52, 53, 54, 60, 61, 62, 63, 70, 71, 72, 80, 81, 90, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 08 2014

Keywords

Comments

Numbers containing at least one pair of adjacent digits with sum <= 9 in decimal representation.

Crossrefs

Cf. A248013 (complement).

Programs

  • Haskell
    a248014 n = a248014_list !! (n-1)
    a248014_list = filter (\x -> a247796 x < x) [0..]

Formula

A247796(a(n)) < a(n).
A168046(a(n)) = 1. [Editor's note: This is obviously wrong. Certainly another sequence number was meant. Please edit or inform us if you find the correct reference.]
a(n) = A039691(n+10) up to a(64) = 118, but a(65) = 119 is not in A039691. - M. F. Hasler, Jan 26 2018

A248514 Fractal sequence of the dispersion of the "odious numbers".

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 4, 2, 1, 5, 6, 3, 7, 4, 2, 8, 1, 9, 10, 5, 11, 6, 3, 12, 13, 7, 4, 14, 2, 15, 16, 8, 1, 17, 18, 9, 19, 10, 5, 20, 21, 11, 6, 22, 3, 23, 24, 12, 25, 13, 7, 26, 4, 27, 28, 14, 2, 29, 30, 15, 31, 16, 8, 32, 1, 33, 34, 17, 35, 18, 9, 36, 37, 19
Offset: 1

Views

Author

Clark Kimberling, Oct 08 2014

Keywords

Comments

As a fractal sequence, it contains infinitely many copies of itself: removing the first occurrence of each number leaves the original sequence.

Examples

			A northwest corner of the dispersion (A248513) of the "odious numbers" (A181155) follows:
1 ... 2 ... 3 ... 5 ... 9 ... 17 .... 33
4 ... 8 ... 15 .. 29 .. 57 .. 113 ... 225
6 ... 12 .. 23 .. 45 .. 89 .. 177 ... 353
7 ... 14 .. 27 .. 53 .. 105 .. 209 .. 417
10 .. 20 .. 39 .. 77 .. 153 .. 305 .. 609
The numbers 1, 2, 3, 4, 5 appear in rows 1, 1, 1, 2, 1, respectively, so that A248514 = (1, 1, 1, 2, 1, ...).
		

References

  • Clark Kimberling, "Fractal sequences and interspersions," Ars Combinatoria 45 (1997) 157-168.

Crossrefs

Cf. A248513.

Programs

  • Mathematica
    r = 40; r1 = 10; (* r = # rows of T, r1 = # rows to show*);
    c = 40; c1 = 12; (* c = # cols of T, c1 = # cols to show*);
    x = GoldenRatio; s[n_] := s[n] = If[n < 1, 0, 2 n - Mod[Total[IntegerDigits[n - 1, 2]], 2]];
    mex[list_] := NestWhile[#1 + 1 &, 1, Union[list][[#1]] <= #1 &, 1,   Length[Union[list]]]; rows = {NestList[s, 1, c]};
    Do[rows = Append[rows, NestList[s, mex[Flatten[rows]], r]], {r}];
    t[i_, j_] := rows[[i, j]]; TableForm[Table[t[i, j], {i, 1, r1}, {j, 1, c1}]] (* A248513 array*)
    u = Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]]  (* A248013 sequence*)
    row[i_] := row[i] = Table[t[i, j], {j, 1, c}]
    f[n_] := Select[Range[r], MemberQ[row[#], n] &]
    v = Flatten[Table[f[n], {n, 1, 200}]]  (* A248514 *)

A173639 Numbers n such that the sum of the digits of 11*n is odd.

Original entry on oeis.org

19, 28, 29, 37, 38, 39, 46, 47, 48, 49, 55, 56, 57, 58, 59, 64, 65, 66, 67, 68, 69, 73, 74, 75, 76, 77, 78, 79, 82, 83, 84, 85, 86, 87, 88, 89, 119, 128, 129, 137, 138, 139, 146, 147, 148, 149
Offset: 1

Views

Author

David Radcliffe, Nov 23 2010

Keywords

Comments

Note that the first 18 multiples of 11 have even digital sums.
Indices of odd entries in A136614. - R. J. Mathar, Nov 23 2010
a(n) = A075517(n+9) = A248013(n+10) for n <= 36. - Giovanni Resta, Sep 04 2017

Examples

			19 is on the list because 11*19 = 209 and 2+0+9 is odd.
		

Crossrefs

Programs

  • Haskell
    a173639 n = a173639_list !! (n-1)
    a173639_list = filter (odd . a007953 . (* 11)) [0..]
    -- Reinhard Zumkeller, Jul 05 2014
  • Maple
    L := []; for n to 150 do if `mod`(add(i, i = convert(11*n, base, 10)), 2) = 1 then L := [op(L), n] end if end do; L;
  • Mathematica
    Select[Range[200],OddQ[Total[IntegerDigits[11#]]]&] (* Harvey P. Dale, May 28 2012 *)
  • Python
    ans = []
    for n in range(1,151):
        N,s = 11*n,0
        while N:
            s += N % 10
            N //= 10
        if s % 2:
            ans.append(n)
    print(ans)
    
Showing 1-4 of 4 results.