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!)
A271268 Concatenate sum of digits of previous term and product of digits of previous term, starting with 8. 1

%I #25 May 26 2020 14:56:52

%S 8,88,1664,17144,17112,1214,88,1664,17144,17112,1214,88,1664,17144,

%T 17112,1214,88,1664,17144,17112,1214,88,1664,17144,17112,1214,88,1664,

%U 17144,17112,1214,88,1664,17144,17112,1214,88,1664,17144,17112,1214,88,1664,17144

%N Concatenate sum of digits of previous term and product of digits of previous term, starting with 8.

%C Each term is created by calculating the sum of the digits of the previous number, and the product of its digits. The results are concatenated to give the new number. Starting with 8, the second number is 88. The third number is generated as follows: 8+8=16, 8x8=64, which gives 1664. Continuing this way, the 7th number in this sequence becomes 88, equal to the second number of the sequence. Therefore, the pattern 88, 1664, 17144, 17112, 1214, ... repeats itself indefinitely.

%H Peter Kagey, <a href="/A271268/b271268.txt">Table of n, a(n) for n = 1..10000</a>

%t NestList[FromDigits@ Join[IntegerDigits@ Total@ #, IntegerDigits[Times @@ #]] &@ IntegerDigits@ # &, 8, 48] (* _Michael De Vlieger_, Aug 26 2016 *)

%t PadRight[{8},50,{1214,88,1664,17144,17112}] (* _Harvey P. Dale_, Oct 04 2017 *)

%o (Haskell)

%o a271268 = 8 : cycle [88, 1664, 17144, 17112, 1214]

%o -- Correction by _Peter Kagey_, Aug 25 2016

%o (Python)

%o from functools import reduce

%o from operator import mul

%o def product(seq):

%o return reduce(mul, seq, 1)

%o def conversion(n):

%o n = str(n)

%o return str(sum(int(i) for i in n)) + \

%o str(product(int(i) for i in n))

%o def a271268(n):

%o if n == 1:

%o return 8

%o else:

%o r = 8

%o while n > 1:

%o r = conversion(r)

%o n -= 1

%o return int(r)

%Y Cf. A271220.

%K nonn,base

%O 1,1

%A _Sander Claassen_, Apr 03 2016

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 14:18 EDT 2024. Contains 371960 sequences. (Running on oeis4.)