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!)
A256639 a(n) is the base-(-10) representation of a(n-1) read in base 10, starting from -1. 0

%I #74 Jun 29 2019 03:54:01

%S -1,19,199,219,399,419,599,619,799,819,999,19019,21199,39219,41399,

%T 59419,61599,79619,81799,99819,1901999,2118019,3922199,4138219,

%U 5942399,6158419,7962599,8178619,9982799,190198819,211802999,392217019,413823199,594237219,615843399,796257419,817863599,998277619,19019883799

%N a(n) is the base-(-10) representation of a(n-1) read in base 10, starting from -1.

%C Decimal -1 in negadecimal is 19, decimal 19 in negadecimal is 199, decimal 199 in negadecimal is 219, ....

%t negaDecimal[n_] := Mod[NestWhileList[Function[k, (Mod[k, 10]-k)/10], n, # != 0&], 10] // Reverse // Rest // FromDigits; a[1] = -1; a[n_] := a[n] = negaDecimal[a[n-1]]; Array[a, 40] (* _Jean-François Alcover_, Nov 23 2016 *)

%o (HP 49G calculator) Given a(n) the program produces a(n+1).

%o ::

%o CK1&Dispatch

%o # FF

%o ::

%o Z10_

%o ZINT -10

%o FPTR2 ^2LAMBIND

%o NULL$SWAP

%o BEGIN

%o 1GETLAM

%o FPTR2 ^IDIV2

%o FPTR2 ^DupQIsZero?

%o ?SKIP

%o ::

%o 2GETLAM

%o FPTR2 ^RADDext

%o SWAP

%o Z1_

%o FPTR2 ^RADDext

%o SWAP

%o ;

%o FPTR2 ^Z>S

%o ROT

%o &$SWAP

%o FPTR2 ^DupQIsZero?

%o UNTIL

%o ABND

%o DROP

%o FPTR2 ^S>Z

%o ;

%o ;

%Y Cf. A039723.

%K sign,base

%O 1,2

%A _Gerald Hillier_, Apr 23 2015

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 March 29 05:43 EDT 2024. Contains 371264 sequences. (Running on oeis4.)