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.

Showing 1-5 of 5 results.

A038471 Sums of 3 distinct powers of 4.

Original entry on oeis.org

21, 69, 81, 84, 261, 273, 276, 321, 324, 336, 1029, 1041, 1044, 1089, 1092, 1104, 1281, 1284, 1296, 1344, 4101, 4113, 4116, 4161, 4164, 4176, 4353, 4356, 4368, 4416, 5121, 5124, 5136, 5184, 5376, 16389, 16401, 16404, 16449, 16452, 16464, 16641, 16644, 16656, 16704
Offset: 1

Views

Author

Keywords

Crossrefs

Base 4 interpretation of A038445.

Programs

  • Mathematica
    Union[Total/@Subsets[4^Range[0,10],{3}]] (* Harvey P. Dale, Oct 20 2012 *)
  • Python
    from math import isqrt, comb
    from sympy import integer_nthroot
    def A038471(n): return (1<<((r:=n-1-comb((m:=integer_nthroot(6*n,3)[0])+(t:=(n>comb(m+2,3)))+1,3))-comb((k:=isqrt(b:=r+1<<1))+(b>k*(k+1)),2)<<1))+(1<<((a:=isqrt(s:=n-comb(m-(t^1)+2,3)<<1))+((s<<2)>(a<<2)*(a+1)+1)<<1))+(1<<(m+t+1<<1)) # Chai Wah Wu, Apr 04 2025

Extensions

Offset corrected by Amiram Eldar, Jul 13 2022

A038472 Sums of 4 distinct powers of 4.

Original entry on oeis.org

85, 277, 325, 337, 340, 1045, 1093, 1105, 1108, 1285, 1297, 1300, 1345, 1348, 1360, 4117, 4165, 4177, 4180, 4357, 4369, 4372, 4417, 4420, 4432, 5125, 5137, 5140, 5185, 5188, 5200, 5377, 5380, 5392, 5440, 16405, 16453, 16465, 16468, 16645, 16657, 16660, 16705, 16708
Offset: 1

Views

Author

Keywords

Crossrefs

Base 4 interpretation of A038446.

Programs

  • Mathematica
    Sort[Plus @@@ Subsets[4^Range[0, 7], {4}]] (* Amiram Eldar, Jul 13 2022 *)

Extensions

Offset corrected by Amiram Eldar, Jul 13 2022

A038473 Sums of 5 distinct powers of 4.

Original entry on oeis.org

341, 1109, 1301, 1349, 1361, 1364, 4181, 4373, 4421, 4433, 4436, 5141, 5189, 5201, 5204, 5381, 5393, 5396, 5441, 5444, 5456, 16469, 16661, 16709, 16721, 16724, 17429, 17477, 17489, 17492, 17669, 17681, 17684, 17729, 17732, 17744, 20501, 20549, 20561, 20564, 20741
Offset: 1

Views

Author

Keywords

Crossrefs

Base 4 interpretation of A038447.

Programs

  • Mathematica
    Take[Total/@Subsets[4^Range[0,10],{5}]//Union,50] (* Harvey P. Dale, Oct 02 2016 *)
  • Python
    from itertools import islice
    def A038473_gen(): # generator of terms
        yield int(bin(n:=31)[2:],4)
        while True: yield int(bin((n:=n^((a:=-n&n+1)|(a>>1)) if n&1 else ((n&~(b:=n+(a:=n&-n)))>>a.bit_length())^b))[2:],4)
    A038473_list = list(islice(A038473_gen(),30)) # Chai Wah Wu, Apr 04 2025

A309759 Numbers that are sums of consecutive powers of 4.

Original entry on oeis.org

1, 4, 5, 16, 20, 21, 64, 80, 84, 85, 256, 320, 336, 340, 341, 1024, 1280, 1344, 1360, 1364, 1365, 4096, 5120, 5376, 5440, 5456, 5460, 5461, 16384, 20480, 21504, 21760, 21824, 21840, 21844, 21845, 65536, 81920, 86016, 87040, 87296, 87360, 87376, 87380
Offset: 1

Views

Author

Ilya Gutkovskiy, Aug 15 2019

Keywords

Comments

Numbers of the form (4^i - 4^j)/3 with i > j.

Examples

			336 = 4^2 + 4^3 + 4^4, so 336 is in the sequence.
+------+--------+
| a(n) | base 4*|
+------+--------+
|   1  |     1  |
|   4  |    10  |
|   5  |    11  |
|  16  |   100  |
|  20  |   110  |
|  21  |   111  |
|  64  |  1000  |
|  80  |  1100  |
|  84  |  1110  |
|  85  |  1111  |
+------+--------+
* - a(n) written in base 4.
		

Crossrefs

Programs

  • Mathematica
    Module[{nn=10,k},k=4^Range[0,nn];Table[Accumulate[Reverse[Take[k,n]]],{n,nn}]]//Flatten (* Harvey P. Dale, May 29 2021 *)
  • Python
    from math import isqrt
    def A309759(n): return ((1<<((m:=isqrt(n<<3)+1>>1)<<1))-(1<Chai Wah Wu, Apr 04 2025

A139369 Array read by antidiagonals, n-th sum of 2 distinct powers of k.

Original entry on oeis.org

3, 4, 5, 5, 10, 6, 6, 17, 12, 9, 7, 26, 20, 28, 10, 8, 37, 30, 65, 30, 12, 9, 50, 42, 126, 68, 36, 17, 10, 65, 56, 217, 130, 80, 82, 18, 11, 82, 72, 344, 222, 150, 257, 84, 20, 12, 101, 90, 513, 350, 252, 626, 260, 90, 24, 13, 122, 110, 730, 520, 392, 1297, 630, 272, 108
Offset: 1

Views

Author

Jonathan Vos Post, Jun 07 2008

Keywords

Comments

n=2 column is A002522 n^2 + 1.
n=3 column is A002378 n*(n+1) Oblong (or pronic, promic, or heteromecic numbers).

Examples

			Array begins:
================================================================================
k....|.n=1.|.n=2.|.n=3.|..n=4.|..n=5.|..n=6.|...n=7.|...n=8.|..n=9.|.n=10|.OEIS.
================================================================================
k=2..|..3..|...5.|..6..|....9.|...10.|...12.|....17.|...18..|...20.|..24.|A018900
k=3..|..4..|..10.|.12..|...28.|...30.|...36.|....82.|...84..|...90.|..108|A038464
k=4..|..5..|..17.|.20..|...65.|...68.|...80.|...257.|..260..|..272.|..320|A038470
k=5..|..6..|..26.|.30..|..126.|..130.|..150.|...626.|..630..|..650.|..750|A038474
k=6..|..7..|..37.|.42..|..217.|..222.|..252.|..1297.|..1302.|.1332.|.1512|A038478
k=7..|..8..|..50.|.56..|..344.|..350.|..392.|..2402.|..2408.|.2450.|.2744|A038481
k=8..|..9..|..65.|.72..|..513.|..520.|..576.|..4097.|..4104.|.4160.|.4608|A038484
k=9..|.10..|..82.|.90..|..730.|..738.|..810.|..6562.|..6570.|.6642.|.7290|A038487
k=10.|.11..|.101.|.110.|.1001.|.1010.|.1100.|.10001.|.10010.|10100.|11000|A038444
k=11.|.12..|.122.|.132.|.1332.|.1342.|.1452.|.14642.|.14652.|14762.|15972|A038490
k=12.|.13..|.145.|.156.|.1729.|.1740.|.1872.|.20737.|.20748.|20880.|22464|A038492
================================================================================
		

Crossrefs

Showing 1-5 of 5 results.