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.

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