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.

A055257 Sums of two powers of 6.

Original entry on oeis.org

2, 7, 12, 37, 42, 72, 217, 222, 252, 432, 1297, 1302, 1332, 1512, 2592, 7777, 7782, 7812, 7992, 9072, 15552, 46657, 46662, 46692, 46872, 47952, 54432, 93312, 279937, 279942, 279972, 280152, 281232, 287712, 326592, 559872, 1679617, 1679622, 1679652, 1679832
Offset: 0

Views

Author

Henry Bottomley, Jun 22 2000

Keywords

Crossrefs

Cf. A052216.

Programs

  • Mathematica
    t = 6^Range[0, 9]; Select[Union[Flatten[Table[i + j, {i, t}, {j, t}]]], # <= t[[-1]] + 1 &] (* T. D. Noe, Oct 09 2011 *)
  • Python
    from math import isqrt
    def A055257(n): return 6**(a:=(k:=isqrt(m:=n<<1))+(m>k*(k+1))-1)+6**(n-1-(a*(a+1)>>1)) # Chai Wah Wu, Apr 08 2025

Formula

a(n) = 6^(n-trinv(n))+6^trinv(n), where trinv(n) = floor((1+sqrt(1+8*n))/2) = A002262(n) and n-trinv(n) = A003056(n)
Regarded as a triangle T(n, k) = 6^n + 6^k, so as a sequence a(n) = 6^A002262(n) + 6^A003056(n).