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!)
A309571 Start with a(1)=1; thereafter the sequence is always extended by adding the n-th digit of the sequence to a(n) if both are of the same parity, otherwise subtracting it. 1

%I #10 Aug 25 2019 13:31:26

%S 1,2,4,8,16,15,9,10,5,14,13,13,18,17,13,14,11,12,9,10,18,17,24,23,26,

%T 25,21,22,21,22,24,15,16,16,15,7,8,1,-1,-5,-7,-4,-2,4,6,1,-1,0,2,4,6,

%U 5,3,1,-1,-5,-4,-9,-8,-2,-3,-9,-8,-13,-6,2,1,2,-3,4,8,10,14,20,19,20,20

%N Start with a(1)=1; thereafter the sequence is always extended by adding the n-th digit of the sequence to a(n) if both are of the same parity, otherwise subtracting it.

%H Jean-Marc Falcoz, <a href="/A309571/b309571.txt">Table of n, a(n) for n = 1..42917</a>

%e The sequence S begins with 1,2,4,8,16,15,9,10,5,...

%e As a(1) = 1 and the 1st digit of S are of same parity, we get a(2) = 1 + 1 = 2;

%e as a(2) = 2 and the 2nd digit of S are of same parity, we get a(3) = 2 + 2 = 4;

%e as a(3) = 4 and the 3rd digit of S are of same parity, we get a(4) = 4 + 4 = 8;

%e as a(4) = 8 and the 4th digit of S are of same parity, we get a(5) = 8 + 8 = 16;

%e as a(5) = 16 and the 5th digit of S are not of same parity, we get a(6) = 16 - 1 = 15;

%e as a(6) = 15 and the 6th digit of S are not of same parity, we get a(7) = 15 - 6 = 9;

%e as a(7) = 8 and the 7th digit of S are of same parity, we get a(8) = 9 + 1 = 10.

%e Etc.

%Y This is a variant of A309529.

%K sign,base

%O 1,2

%A _Eric Angelini_ and _Jean-Marc Falcoz_, Aug 08 2019

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 July 15 05:04 EDT 2024. Contains 374324 sequences. (Running on oeis4.)