OFFSET
1,2
LINKS
Kevin Ryde, Table of n, a(n) for n = 1..700
Nicolas Bělohoubek, C# program
Nicolas Bělohoubek, Subsequences of form A-(B)-C
Kevin Ryde, PARI/GP Code
EXAMPLE
0 = 0*0 + 0*0;
36 = 3*6 + 3*6;
655 = 6*55 + 65*5;
6208 = 6*208 + 620*8;
...
MATHEMATICA
Select[Range[0, 10^6], Part[digits=IntegerDigits[#], 1]FromDigits[Drop[digits, 1]] + FromDigits[Drop[digits, -1]]Part[digits, Length[digits]] == # &] (* Stefano Spezia, Dec 10 2023 *)
PROG
(Python)
def ok(n):
if n < 10: return n == 0
s = str(n)
return n == int(s[0])*int(s[1:]) + (n%10)*(n//10)
print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Dec 10 2023
(Python) # faster for generating initial segment of sequence
from itertools import count, islice
def agen(): # generator of terms
yield 0
for digits in count(2):
for first in range(1, 10):
base = first*10**(digits-1)
for rest in range(10**(digits-1)):
n = base + rest
if first*rest + (n%10)*(n//10) == n:
yield n
print("...", digits, first, time()-time0, alst)
print(list(islice(agen(), 18))) # Michael S. Branicky, Dec 10 2023
(PARI) See links.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Nicolas Bělohoubek, Dec 10 2023
EXTENSIONS
a(24)-a(30) from Michael S. Branicky, Dec 10 2023
STATUS
approved