cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A162394 Fibonacci numbers (A000045) which are anagrams of Triangular numbers (A000217).

This page as a plain text file.
%I A162394 #14 Feb 18 2024 14:49:41
%S A162394 0,1,3,21,55,2584,28657,2178309,5702887,14930352,102334155,267914296,
%T A162394 701408733,2971215073,4807526976,7778742049,12586269025,32951280099,
%U A162394 225851433717,591286729879,1548008755920,10610209857723,27777890035288,72723460248141,308061521170129,498454011879264,806515533049393,1304969544928657,3416454622906707
%N A162394 Fibonacci numbers (A000045) which are anagrams of Triangular numbers (A000217).
%H A162394 Michael S. Branicky, <a href="/A162394/b162394.txt">Table of n, a(n) for n = 1..38</a> (all terms <= 20 digits)
%e A162394 2584 is A000045(18) and is an anagram of 2485 = A000217(70).
%e A162394 28567 is A000045(23) and is an anagram of 67528 = A000217(367).
%o A162394 (Python)
%o A162394 from math import isqrt
%o A162394 from itertools import count, islice
%o A162394 def tris(d): # generator of triangular numbers with d digits
%o A162394     ilb, lb, ub = isqrt(2*10**(d-1))-1, 10**(d-1), 10**d
%o A162394     if d == 1: yield 0
%o A162394     for i in count(ilb):
%o A162394         t = i*(i+1)//2
%o A162394         if t < lb: continue
%o A162394         elif t >= ub: break
%o A162394         yield t
%o A162394 def agen(): # generator of sequence terms
%o A162394     yield 0
%o A162394     f, g, n, adict = 1, 2, 1, dict()
%o A162394     for d in count(1):
%o A162394         T = set("".join(sorted(str(t))) for t in tris(d))
%o A162394         while f < 10**d:
%o A162394             if "".join(sorted(str(f))) in T: yield f
%o A162394             f, g = g, f+g
%o A162394 print(list(islice(agen(), 20))) # _Michael S. Branicky_, Feb 18 2024
%Y A162394 Cf. A000045, A000217.
%K A162394 nonn,base
%O A162394 1,3
%A A162394 _Claudio Meller_, Jul 02 2009
%E A162394 Edited and extended by _Ray Chandler_, Jul 09 2009
%E A162394 a(24)-a(29) from _Chai Wah Wu_, Dec 25 2016