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

A263808 Numbers k such that the iterated subtraction of the decimal digits eventually reaches -k.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 18, 20, 21, 22, 24, 27, 30, 33, 36, 40, 42, 44, 45, 48, 50, 51, 54, 55, 60, 63, 66, 70, 72, 77, 80, 81, 84, 88, 89, 90, 98, 99, 100, 101, 102, 105, 108, 110, 111, 112, 113, 114, 116, 117, 120, 123, 124, 126, 128
Offset: 1

Views

Author

Keywords

Comments

A180477 is a subsequence of this sequence. - Hans Havermann, Oct 27 2015

Examples

			a(14)=18: 18-1-8-1-8-1-8-1-8 = -18. - _Bob Selcoe_, Oct 27 2015
		

Crossrefs

Programs

  • Haskell
    a263808 n = a263808_list !! (n-1)
    a263808_list = filter essicran [1..] where
       essicran x = last (takeWhile (>= -x) es) == -x where
         es = scanl (-) x (cycle $ map (read . return) $ show x)
    
  • Mathematica
    eQ[n_] := Block[{d = IntegerDigits@ n}, MemberQ[Accumulate@ d ~Prepend~ 0, Mod[2*n, Total@ d]]]; Select[Range@ 128, eQ] (* Giovanni Resta, Oct 27 2015 *)
  • PARI
    is(n)=my(d=digits(n),t,S=vector(#d-1,i,t+=d[i])); t=2*n%vecsum(d); t==0 || setsearch(S,d) \\ Charles R Greathouse IV, Oct 28 2015

A271239 Numbers n such that n is divisible by the median of its digits.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 18, 20, 21, 22, 24, 27, 30, 33, 36, 40, 42, 44, 45, 48, 50, 51, 54, 55, 60, 63, 66, 70, 72, 77, 80, 81, 84, 88, 90, 99, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119
Offset: 1

Views

Author

Keywords

Comments

The first cases that are prime numbers :
a(2)=2;
a(3)=3;
a(5)=5;
a(7)=7;
a(11)=11;
a(44)=101;
a(46)=103;
a(50)=107.
The first difference from A180477 is that n = 100 is in that sequence but not here.

Examples

			72 is a member because the median of its digits (7, 2) is 9/2 and 72 is divisible by 9/2 (i.e., the ratio 72/(9/2) is an integer).
		

Crossrefs

Programs

  • Mathematica
    Select[Range[500], Quiet@ Divisible[#, Median@ IntegerDigits@ #] &] (* Giovanni Resta, Apr 08 2016 *)
Showing 1-2 of 2 results.