Find the first 50 Iccanobif numbers. Iccanobif Numbers – These are like Fibonacci numbers. In Fibonacci numbers, nth term is the sum of previous two terms. In Iccanobif numbers, nth term is the sum of reverse of previous two terms. Hence, if previous two terms are 13 and 39, then next Iccanobif number will be 31+93 = 124.
📌 Challenge Details and Links
ExcelBI Excel Challenge Number: 329
Challenge Difficulty: ⭐️⭐️
📥Download Sample File
📥Link to the solutions on LinkedIn
Solving the challenge of Find the first 50 Iccanobif numbers with Power Query
Power Query solution 1 for Find the first 50 Iccanobif numbers, proposed by Zoran Milokanović:
let
Source = List.Accumulate(
{1 .. 48},
{0, 1},
(s, c) =>
let
l = List.LastN(s, 2),
r = each Number.From(Text.Reverse(Text.From(_)))
in
s & {r(l{0}) + r(l{1})}
)
in
Source
Power Query solution 2 for Find the first 50 Iccanobif numbers, proposed by Ramiro Ayala Chávez:
let
a = List.Generate(
() => [x = 0, y = 1, c = 1],
each [c] <= 50,
each [
y = Number.From(Text.Reverse(Text.From([x]))) + Number.From(Text.Reverse(Text.From([y]))),
x = [y],
c = [c] + 1
],
each [x]
),
Sol = Table.FromColumns({a}, {"Answer Expected"})
in
Sol
Power Query solution 3 for Find the first 50 Iccanobif numbers, proposed by Rafael González B.:
let
IC = Table.FromColumns(
{List.Generate(
() => [x = 0, y = 1, c = 1],
each [c] <= 50,
each [
T = Text.From,
N = Number.From,
TR = Text.Reverse,
y = N(TR(T([x]))) + N(TR(T([y]))),
x = [y],
c = [c] + 1
],
each [x]
)},
type table [Answer = number])
in
IC
🧙♂️ 🧙♂️ 🧙♂️
Solving the challenge of Find the first 50 Iccanobif numbers with Excel
Excel solution 1 for Find the first 50 Iccanobif numbers, proposed by Bo Rydobon 🇹🇭:
=REDUCE(
{0;1},
SEQUENCE(
48
),
LAMBDA(
a,
v,
VSTACK(
a,
REDUCE(
0,
TAKE(
a,
-2
),
LAMBDA(
c,
w,
c+CONCAT(
MID(
w,
16-SEQUENCE(
15
),
1
)
)
)
)
)
)
)
Excel solution 2 for Find the first 50 Iccanobif numbers, proposed by Rick Rothstein:
=LET(
f,
LAMBDA(
n,
0+CONCAT(
MID(
n,
16-SEQUENCE(
15
),
1
)
)
),
REDUCE(
{0;1},
SEQUENCE(
48
),
LAMBDA(
a,
v,
VSTACK(
a,
f(
0+TAKE(
a,
-1
)
)+f(
0+TAKE(
DROP(
a,
-1
),
-1
)
)
)
)
)
)
Excel solution 3 for Find the first 50 Iccanobif numbers, proposed by John V.:
=REDUCE(
{0;1},
ROW(
1:48
),
LAMBDA(
a,
v,
VSTACK(
a,
SUM(
--MAP(
TAKE(
a,
-2
),
LAMBDA(
x,
CONCAT(
MID(
x,
16-ROW(
1:15
),
1
)
)
)
)
)
)
)
)
Excel solution 4 for Find the first 50 Iccanobif numbers, proposed by محمد حلمي:
=REDUCE(
{0;1},
SEQUENCE(
48
),
LAMBDA(
a,
d,
VSTACK(
a,
SUM(
--TAKE(
MAP(
a,
LAMBDA(
x,
CONCAT(
MID(
x,
16-SEQUENCE(
15
),
1
)
)
)
),
-2
)
)
)
)
)
Excel solution 5 for Find the first 50 Iccanobif numbers, proposed by Kris Jaganah:
=REDUCE(
{0;1},
SEQUENCE(
48
),
LAMBDA(
x,
y,
VSTACK(
x,
SUM(
MAP(
TAKE(
x,
-2
),
LAMBDA(
z,
--CONCAT(
MID(
z,
SEQUENCE(
,
LEN(
z
),
LEN(
z
),
-1
),
1
)
)
)
)
)
)
)
)
Excel solution 6 for Find the first 50 Iccanobif numbers, proposed by Julian Poeltl:
=LET(
R,
LAMBDA(
A,
CONCAT(
MID(
A,
SEQUENCE(
@LEN(
A
),
,
@LEN(
A
),
-1
),
1
)
)
),
REDUCE(
VSTACK(
0,
1
),
SEQUENCE(
48
),
LAMBDA(
A,
B,
VSTACK(
A,
R(
INDEX(
A,
B
)
)+R(
INDEX(
A,
B+1
)
)
)
)
)
)
Excel solution 7 for Find the first 50 Iccanobif numbers, proposed by Timothée BLIOT:
=REDUCE(
{0;1},
SEQUENCE(
48
),
LAMBDA(
a,
v,
VSTACK(
a,
SUM(
MAP(
TAKE(
a,
-2
),
LAMBDA(
x,
--CONCAT(
MID(
x,
SEQUENCE(
LEN(
x
),
,
LEN(
x
),
-1
),
1
)
)
)
)
)
)
)
)
Excel solution 8 for Find the first 50 Iccanobif numbers, proposed by LEONARD OCHEA 🇷🇴:
=REDUCE(
{0;1},
SEQUENCE(
48
),
LAMBDA(
a,
b,
VSTACK(
a,
SUM(
MAP(
TAKE(
a,
-2
),
LAMBDA(
c,
LET(
l,
LEN(
c
),
--CONCAT(
MID(
c,
l-SEQUENCE(
l
)+1,
1
)
)
)
)
)
)
)
)
)
Excel solution 9 for Find the first 50 Iccanobif numbers, proposed by Abdallah Ally:
=LET(
n,
10,
f,
LAMBDA(
v,
1*CONCAT(
MID(
v,
SEQUENCE(
LEN(
v
),
,
LEN(
v
),
-1
),
1
)
)
),
REDUCE(
{0;1},
SEQUENCE(
n-2
),
LAMBDA(
x,
y,
VSTACK(
x,
f(
SUM(
TAKE(
x,
-1
)
)
) + f(
SUM(
DROP(
TAKE(
x,
-2
),
-1
)
)
)
)
)
)
)
Excel solution 10 for Find the first 50 Iccanobif numbers, proposed by Abdallah Ally:
=LET(n,50,s,LAMBDA(x,1*CONCAT(MID(x,SEQUENCE(LEN(x),,LEN(x),-1),1))),rfn,LAMBDA(f,x,y,a,IF(COUNT(a)=n,a,f(f,y,s(x)+s(y),VSTACK(a,s(x)+s(y))))),rfn(rfn,0,1,{0;1}))
Excel solution 11 for Find the first 50 Iccanobif numbers, proposed by 🇵🇪 Ned Navarrete C.:
=REDUCE({0;1},
SEQUENCE(
48
),
LAMBDA(a,
b,
VSTACK(a,
REDUCE(0,
TAKE(
a,
-2
),
LAMBDA(c,
v,
c+LET(s,
SEQUENCE(
LEN(
v
)
),
SUM(MID(
v,
s,
1
)*10^(s-1))))))))
Excel solution 12 for Find the first 50 Iccanobif numbers, proposed by Md. Zohurul Islam:
=LET(
sq,
SEQUENCE(
50
),
w,
REDUCE(
1,
sq,
LAMBDA(
x,
y,
LET(
a,
TAKE(
x,
-2
),
b,
MAP(
a,
LAMBDA(
z,
LET(
n,
SEQUENCE(
LEN(
z
)
),
u,
CONCAT(
SORTBY(
MID(
z,
n,
1
),
n,
-1
)
)+0,
u
)
)
),
c,
SUM(
b
),
d,
VSTACK(
x,
c
),
d
)
)
),
z,
TAKE(
VSTACK(
0,
w
),
50
),
z
)
Excel solution 13 for Find the first 50 Iccanobif numbers, proposed by Charles Roldan:
=REDUCE({0;1},
SEQUENCE(
48
),
LAMBDA(a,
b,
VSTACK(a,
SUM(--MAP(TAKE(
a,
-2
),
LAMBDA(Ω,
Ω(Ω))(LAMBDA(Ω,
LAMBDA(x,
IF(LEN(
x
),
Ω(Ω)(REPLACE(
x,
1,
1,
)) & LEFT(
x
),
)))))))))
Excel solution 14 for Find the first 50 Iccanobif numbers, proposed by Pieter de Bruijn:
=REDUCE({0;1},SEQUENCE(48),LAMBDA(x,y,VSTACK(x,SUM(MAP(TAKE(x,-2),LAMBDA(z,--CONCAT(MID(z,1+LEN(z)-SEQUENCE(,LEN(z)),1))))))))
Excel solution 15 for Find the first 50 Iccanobif numbers, proposed by Giorgi Goderdzishvili:
=LET(
lst,
SCAN(
"0!1",
SEQUENCE(
60
),
LAMBDA(
a,
v,
CONCAT(
TAKE(
TEXTSPLIT(
a,
"!"
),
,
-1
),
"!",
SUM(
BYROW(
MID(
--TEXTSPLIT(
a,
,
"!"
),
SEQUENCE(
,
20,
20,
-1
),
1
),
LAMBDA(
z,
CONCAT(
z
)*1
)
)
)
)
)
),
ls,
TEXTBEFORE(
lst,
"!"
)*1,
fin,
VSTACK(
0,
TAKE(
ls,
49
)
),
fin
)
Excel solution 16 for Find the first 50 Icc&anobif numbers, proposed by Abdelrahman Omer, MBA, PMP:
=REDUCE(
{0;1},
SEQUENCE(
50-2
),
LAMBDA(
x,
y,
VSTACK(
x,
SUM(
MAP(
TAKE(
x,
-2
),
LAMBDA(
z,
--CONCAT(
MID(
z,
LEN(
z
)-SEQUENCE(
LEN(
z
),
,
0
),
1
)
)
)
)
)
)
)
)
Solving the challenge of Find the first 50 Iccanobif numbers with Python
Python solution 1 for Find the first 50 Iccanobif numbers, proposed by John V.:
Hi everyone!
One [Python] option could be:
for _ in range(n):
a, b = b, int(str(a)[::-1]) + int(str(b)[::-1])
return a
[i(n) for n in range(50)]
Blessings!
Solving the challenge of Find the first 50 Iccanobif numbers with R
R solution 1 for Find the first 50 Iccanobif numbers, proposed by Konrad Gryczan, PhD:
library(tidyverse)
library(readxl)
library(stringi)
test = read_excel("Iccanobif Numbers.xlsx", range = "A2:A51", col_names = FALSE) %>% pull()
reverse_digits <- function(n) {
as.numeric(stri_reverse(as.character(n)))
}
generate_iccanobif <- function(N) {
iccanobif <- c(0, 1)
for (i in 3:N) {
next_term <- reverse_digits(iccanobif[i - 1]) + reverse_digits(iccanobif[i - 2])
iccanobif <- c(iccanobif, next_term)
}
iccanobif
}
iccanobif_50 <- generate_iccanobif(50)
&&
