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.

A055258 Sums of two powers of 7.

Original entry on oeis.org

2, 8, 14, 50, 56, 98, 344, 350, 392, 686, 2402, 2408, 2450, 2744, 4802, 16808, 16814, 16856, 17150, 19208, 33614, 117650, 117656, 117698, 117992, 120050, 134456, 235298, 823544, 823550, 823592, 823886, 825944, 840350, 941192, 1647086, 5764802, 5764808, 5764850, 5765144, 5767202, 5781608, 5882450, 6588344, 11529602
Offset: 0

Views

Author

Henry Bottomley, Jun 22 2000

Keywords

Crossrefs

Cf. A052216.
Equals 2*A073218.

Programs

  • Mathematica
    t = 7^Range[0, 9]; Select[Union[Flatten[Table[i + j, {i, t}, {j, t}]]], # <= t[[-1]] + 1 &] (* T. D. Noe, Oct 09 2011 *)
    Total/@Tuples[7^Range[0,10],2]//Union (* Harvey P. Dale, Dec 31 2017 *)
  • Python
    from math import isqrt
    def A055258(n): return 7**(a:=(k:=isqrt(m:=n<<1))+(m>k*(k+1))-1)+7**(n-1-(a*(a+1)>>1)) # Chai Wah Wu, Apr 08 2025

Formula

a(n) = 7^(n-trinv(n))+7^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) = 7^n + 7^k, so as a sequence a(n) = 7^A002262(n) + 7^A003056(n).