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-10 of 26 results. Next

A061470 First (leftmost) digit - second digit + third digit - fourth digit .... = 1.

Original entry on oeis.org

1, 10, 21, 32, 43, 54, 65, 76, 87, 98, 100, 111, 122, 133, 144, 155, 166, 177, 188, 199, 210, 221, 232, 243, 254, 265, 276, 287, 298, 320, 331, 342, 353, 364, 375, 386, 397, 430, 441, 452, 463, 474, 485, 496, 540, 551, 562, 573, 584, 595, 650, 661, 672, 683
Offset: 1

Views

Author

Amarnath Murthy, May 05 2001

Keywords

Examples

			221 is in the sequence since 2-2+1 = 1.
		

Crossrefs

Programs

  • Haskell
    a061470 n = a061470_list !! (n-1)
    a061470_list = filter ((== 1) . a225693) [0..]
    -- Reinhard Zumkeller, Aug 08 2014
  • Mathematica
    d[n_]:=IntegerDigits[n]; a[n_]:=Differences[Reverse[Total/@{Take[d[n],{1,-1,2}],Take[d[n],{2,-1,2}]}]]; Select[Range[690],a[#]=={1} &] (* Jayanta Basu, May 18 2013 *)
    Select[Range[1000],Total[Times@@@Partition[Riffle[IntegerDigits[#],{1,-1},{2,-1,2}],2]]==1&] (* Harvey P. Dale, May 24 2021 *)

Formula

A225693(a(n)) = 1. - Reinhard Zumkeller, Aug 08 2014

Extensions

More terms from Robert G. Wilson v, May 10 2001 and from Larry Reeves (larryr(AT)acm.org), May 14 2001

A061870 Numbers such that |first digit - second digit + third digit - fourth digit ...| = 1.

Original entry on oeis.org

1, 10, 12, 21, 23, 32, 34, 43, 45, 54, 56, 65, 67, 76, 78, 87, 89, 98, 100, 111, 120, 122, 131, 133, 142, 144, 153, 155, 164, 166, 175, 177, 186, 188, 197, 199, 210, 221, 230, 232, 241, 243, 252, 254, 263, 265, 274, 276, 285, 287, 296, 298, 320, 331, 340, 342
Offset: 1

Views

Author

Robert G. Wilson v, May 10 2001

Keywords

Comments

Multiples of 11 plus or minus 1. If 11k+1 is a perfect square (see A219257) then a(n) is the square root of 11k+1. [Gary Detlefs, Feb 22 2010]

Examples

			120 is in the sequence since |1-2+0| = 1.
		

Crossrefs

Programs

  • Mathematica
    fQ[n_] := Abs[Plus @@ (((-1)^Range[Floor[Log[10, n] + 1]])*IntegerDigits@n)] == 1; Select[ Range@342, fQ@# &]
  • PARI
    altsum(v)=sum(i=1,#v,v[i]*(-1)^i)
    is(n)=abs(altsum(digits(n)))==1 \\ Charles R Greathouse IV, May 21 2014
    
  • Python
    def ok(n): return abs(sum(int(di)*(-1)**i for i, di in enumerate(str(n)))) == 1
    print([k for k in range(343) if ok(k)]) # Michael S. Branicky, Jan 26 2023

A060978 |First digit - second digit + third digit - fourth digit ...| = 10.

Original entry on oeis.org

109, 208, 219, 307, 318, 329, 406, 417, 428, 439, 505, 516, 527, 538, 549, 604, 615, 626, 637, 648, 659, 703, 714, 725, 736, 747, 758, 769, 802, 813, 824, 835, 846, 857, 868, 879, 901, 912, 923, 934, 945, 956, 967, 978, 989, 1090, 1209, 1308, 1319, 1407
Offset: 1

Views

Author

Robert G. Wilson v, May 10 2001

Keywords

Crossrefs

Programs

  • Mathematica
    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 ] ] == 10, Print[ n ] ], {n, 1, 2000} ]
    Select[Range[1500],Abs[Total[Times@@@Partition[Riffle[IntegerDigits[#],{1,-1},{2,-1,2}],2]]]==10&] (* Harvey P. Dale, Apr 13 2020 *)

A060980 |First digit - second digit + third digit - fourth digit ...| = 12.

Original entry on oeis.org

309, 408, 419, 507, 518, 529, 606, 617, 628, 639, 705, 716, 727, 738, 749, 804, 815, 826, 837, 848, 859, 903, 914, 925, 936, 947, 958, 969, 1409, 1508, 1519, 1607, 1618, 1629, 1706, 1717, 1728, 1739, 1805, 1816, 1827, 1838, 1849, 1904, 1915, 1926, 1937
Offset: 1

Views

Author

Robert G. Wilson v, May 10 2001

Keywords

Crossrefs

Programs

  • Mathematica
    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 ] ] == 12, Print[ n ] ], {n, 1, 2000} ]
    Select[Range[2000],Abs[Total[Times@@@Partition[Riffle[IntegerDigits[#],{1,-1},{2,-1,2}],2]]]==12&] (* Harvey P. Dale, Sep 12 2017 *)

A061479 Smallest number m such that first digit - second digit + third digit - fourth digit ... (of m) = n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 109, 209, 309, 409, 509, 609, 709, 809, 909, 10909, 20909, 30909, 40909, 50909, 60909, 70909, 80909, 90909, 1090909, 2090909, 3090909, 4090909, 5090909, 6090909, 7090909, 8090909, 9090909, 109090909, 209090909
Offset: 0

Views

Author

Amarnath Murthy, May 05 2001

Keywords

Examples

			a(14) = 509 as 5-0+9 =14 and it is the smallest such number.
		

Crossrefs

Programs

  • Mathematica
    m = 0; Do[ While[ a = IntegerDigits[ m ]; 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} ]; Abs[ Apply[ Plus, o ] - Apply [ Plus, e ] ] != n, m++ ]; Print[ m ], {n, 1, 50} ]

Extensions

More terms from Robert G. Wilson v, May 10 2001

A061882 a(n) = Smallest nontrivial number k > 9 such that first (leftmost) digit - second digit + third digit - fourth digit ... of k = n.

Original entry on oeis.org

11, 10, 20, 30, 40, 50, 60, 70, 80, 90, 109, 209, 309, 409, 509, 609, 709, 809, 909, 10909, 20909, 30909, 40909, 50909, 60909, 70909, 80909, 90909, 1090909, 2090909, 3090909, 4090909, 5090909, 6090909, 7090909, 8090909, 9090909, 109090909
Offset: 0

Views

Author

Larry Reeves (larryr(AT)acm.org), May 15 2001

Keywords

Comments

Starting with 109, this sequence has the same terms as A060982 and A061479. - Georg Fischer, May 24 2022

Crossrefs

Programs

  • PARI
    a(n) = my(k=1,d=digits(k)); while (sum(k=1, #d, (-1)^(k+1)*d[k]) != n, k++; d=digits(k)); k; \\ Michel Marcus, May 24 2022

Extensions

Definition amended by Georg Fischer, May 24 2022

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

Original entry on oeis.org

209, 308, 319, 407, 418, 429, 506, 517, 528, 539, 605, 616, 627, 638, 649, 704, 715, 726, 737, 748, 759, 803, 814, 825, 836, 847, 858, 869, 902, 913, 924, 935, 946, 957, 968, 979, 1309, 1408, 1419, 1507, 1518, 1529, 1606, 1617, 1628, 1639, 1705, 1716
Offset: 1

Views

Author

Robert G. Wilson v, May 10 2001

Keywords

Comments

Note that all terms are divisible by eleven.

Crossrefs

Programs

  • Haskell
    a060979 n = a060979_list !! (n-1)
    a060979_list = filter (\x -> let digs = map (read . return) $ show x in
                                 evens digs /= odds digs) [11, 22 ..]
       where evens [] = 0; evens [x] = x; evens (x:_:xs) = x + evens xs
             odds [] = 0; odds [x] = 0; odds (_:x:xs) = x + odds xs
    -- Reinhard Zumkeller, Jul 05 2014
  • Maple
    filter:= proc(n) local L,i;
      L:= convert(n,base,10);
      abs(add(L[i]*(-1)^i,i=1..nops(L))) = 11
    end proc:
    select(filter, [$1..1000] *~ 11); # Robert Israel, Jun 02 2023
  • Mathematica
    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} ]
    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 *)

Extensions

Erroneous comment deleted by Robert Israel, Jun 02 2023

A061478 First (leftmost) digit - second digit + third digit - fourth digit .... = 9.

Original entry on oeis.org

9, 90, 108, 119, 207, 218, 229, 306, 317, 328, 339, 405, 416, 427, 438, 449, 504, 515, 526, 537, 548, 559, 603, 614, 625, 636, 647, 658, 669, 702, 713, 724, 735, 746, 757, 768, 779, 801, 812, 823, 834, 845, 856, 867, 878, 889, 900, 911, 922, 933, 944, 955
Offset: 1

Views

Author

Amarnath Murthy, May 05 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[1000],Total[Times@@@Partition[Riffle[IntegerDigits[#],{1,-1},{2,-1,2}],2]]==9&] (* Harvey P. Dale, Jul 16 2017 *)

Extensions

More terms from Robert G. Wilson v, May 10 2001 and from Larry Reeves (larryr(AT)acm.org), May 15 2001

A061471 First (leftmost) digit - second digit + third digit - fourth digit .... = 2.

Original entry on oeis.org

2, 20, 31, 42, 53, 64, 75, 86, 97, 101, 112, 123, 134, 145, 156, 167, 178, 189, 200, 211, 222, 233, 244, 255, 266, 277, 288, 299, 310, 321, 332, 343, 354, 365, 376, 387, 398, 420, 431, 442, 453, 464, 475, 486, 497, 530, 541, 552, 563, 574, 585, 596, 640, 651
Offset: 1

Views

Author

Amarnath Murthy, May 05 2001

Keywords

Comments

a(n) == 9*(-1)^d (mod 11) if a(n) has d digits. - Robert Israel, Aug 05 2020

Crossrefs

Programs

  • Maple
    filter:= proc(n) local d,L,j;
      L:= convert(n,base,10);
      d:= nops(L);
      add(L[j]*(-1)^(d-j),j=1..d)=2
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Aug 05 2020
  • Mathematica
    okQ[n_] := With[{id = IntegerDigits[n]}, id.Array[2 Mod[#, 2] - 1&, Length[id]] == 2]; Select[Range[1000], okQ] (* Jean-François Alcover, Nov 17 2016 *)
    Select[Range[700],Total[Times@@@Partition[Riffle[IntegerDigits[#],{1,-1},{2,-1,2}],2]] == 2&] (* Harvey P. Dale, Mar 01 2023 *)

Extensions

More terms from Robert G. Wilson v, May 10 2001 and from Larry Reeves (larryr(AT)acm.org), May 14 2001

A061472 First (leftmost) digit - second digit + third digit - fourth digit .... = 3.

Original entry on oeis.org

3, 30, 41, 52, 63, 74, 85, 96, 102, 113, 124, 135, 146, 157, 168, 179, 201, 212, 223, 234, 245, 256, 267, 278, 289, 300, 311, 322, 333, 344, 355, 366, 377, 388, 399, 410, 421, 432, 443, 454, 465, 476, 487, 498, 520, 531, 542, 553, 564, 575, 586, 597, 630
Offset: 1

Views

Author

Amarnath Murthy, May 05 2001

Keywords

Examples

			124 is in the sequence since 1 - 2 + 4 = 3.
		

Crossrefs

Programs

  • Maple
    A225693:= proc(n) local L,m,i;
      L:= convert(n,base,10);
      m:= nops(L);
      add(L[i]*(-1)^(m-i),i=1..m);
    end proc:
    select(A225693=3, [$1..1000]); # Robert Israel, Jun 12 2019
  • Mathematica
    aQ[n_] := Differences[Total @ Take[IntegerDigits[n], {#, -1, 2}] & /@ {2, 1}][[1]] == 3; Select[Range[1000], aQ] (* Amiram Eldar, Jun 12 2019 *)
    Select[Range[1000],Total[Times@@@Partition[Riffle[IntegerDigits[#],{1,-1},{2,-1,2}],2]]==3&] (* Harvey P. Dale, May 16 2020 *)
  • PARI
    isok(n) = my(d=digits(n)); sum(k=1, #d, (-1)^(k+1)*d[k]) == 3; \\ Michel Marcus, Jun 12 2019

Formula

A225693(n) = 3. - Robert Israel, Jun 12 2019

Extensions

More terms from Robert G. Wilson v, May 10 2001 and from Larry Reeves (larryr(AT)acm.org), May 14 2001
Showing 1-10 of 26 results. Next