login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A061471 First (leftmost) digit - second digit + third digit - fourth digit .... = 2. 2

%I #14 Mar 01 2023 15:13:35

%S 2,20,31,42,53,64,75,86,97,101,112,123,134,145,156,167,178,189,200,

%T 211,222,233,244,255,266,277,288,299,310,321,332,343,354,365,376,387,

%U 398,420,431,442,453,464,475,486,497,530,541,552,563,574,585,596,640,651

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

%C a(n) == 9*(-1)^d (mod 11) if a(n) has d digits. - _Robert Israel_, Aug 05 2020

%H Robert Israel, <a href="/A061471/b061471.txt">Table of n, a(n) for n = 1..10000</a>

%p filter:= proc(n) local d,L,j;

%p L:= convert(n,base,10);

%p d:= nops(L);

%p add(L[j]*(-1)^(d-j),j=1..d)=2

%p end proc:

%p select(filter, [$1..1000]); # _Robert Israel_, Aug 05 2020

%t 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 *)

%t Select[Range[700],Total[Times@@@Partition[Riffle[IntegerDigits[#],{1,-1},{2,-1,2}],2]] == 2&] (* _Harvey P. Dale_, Mar 01 2023 *)

%Y Cf. A008593, A060978-A060980, A060982, A061470-A061479, A061870-A061882.

%K nonn,base,easy

%O 1,1

%A _Amarnath Murthy_, May 05 2001

%E More terms from _Robert G. Wilson v_, May 10 2001 and from Larry Reeves (larryr(AT)acm.org), May 14 2001

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 04:14 EDT 2024. Contains 371918 sequences. (Running on oeis4.)