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.

A060979 |First digit - second digit + third digit - fourth digit ...| = 11.

This page as a plain text file.
%I A060979 #16 Jun 02 2023 15:20:48
%S A060979 209,308,319,407,418,429,506,517,528,539,605,616,627,638,649,704,715,
%T A060979 726,737,748,759,803,814,825,836,847,858,869,902,913,924,935,946,957,
%U A060979 968,979,1309,1408,1419,1507,1518,1529,1606,1617,1628,1639,1705,1716
%N A060979 |First digit - second digit + third digit - fourth digit ...| = 11.
%C A060979 Note that all terms are divisible by eleven.
%H A060979 Harvey P. Dale, <a href="/A060979/b060979.txt">Table of n, a(n) for n = 1..1000</a>
%p A060979 filter:= proc(n) local L,i;
%p A060979   L:= convert(n,base,10);
%p A060979   abs(add(L[i]*(-1)^i,i=1..nops(L))) = 11
%p A060979 end proc:
%p A060979 select(filter, [$1..1000] *~ 11); # _Robert Israel_, Jun 02 2023
%t A060979 Do[ a = IntegerDigits[ n ]; l = Length[ a ]; e = o = {}; Do[ o = Append[ o, a[ [ 2k - 1 ] ] ], {k, 1, l/2 + .5} ]; Do[ e = Append[ e, a[ [ 2k ] ] ], {k, 1, l/2} ]; If[ Abs[ Apply[ Plus, o ] - Apply[ Plus, e ] ] == 11, Print[ n ] ], {n, 1, 2000} ]
%t A060979 d11Q[n_]:=Module[{idn=IntegerDigits[n]},Abs[Total[Table[(-1)^(i+1) idn[[i]],{i,Length[idn]}]]]==11]; Select[Range[1800],d11Q] (* _Harvey P. Dale_, Aug 26 2012 *)
%o A060979 (Haskell)
%o A060979 a060979 n = a060979_list !! (n-1)
%o A060979 a060979_list = filter (\x -> let digs = map (read . return) $ show x in
%o A060979                              evens digs /= odds digs) [11, 22 ..]
%o A060979    where evens [] = 0; evens [x] = x; evens (x:_:xs) = x + evens xs
%o A060979          odds [] = 0; odds [x] = 0; odds (_:x:xs) = x + odds xs
%o A060979 -- _Reinhard Zumkeller_, Jul 05 2014
%Y A060979 Cf. A008593, A060978-A060980, A060982, A061470-A061479, A061870-A061882.
%Y A060979 Cf. A135499.
%K A060979 base,nonn,easy
%O A060979 1,1
%A A060979 _Robert G. Wilson v_, May 10 2001
%E A060979 Erroneous comment deleted by _Robert Israel_, Jun 02 2023