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.

Previous Showing 61-70 of 77 results. Next

A173195 Values of k such that 4^x + 4^y + 4^z = k^2 with arbitrary integers x <= y <= z.

Original entry on oeis.org

3, 6, 9, 12, 18, 24, 33, 36, 48, 66, 72, 96, 129, 132, 144, 192, 258, 264, 288, 384, 513, 516, 528, 576, 768, 1026, 1032, 1056, 1152, 1536, 2049, 2052, 2064, 2112, 2304, 3072, 4098, 4104, 4128, 4224, 4608, 6144, 8193, 8196, 8208, 8256, 8448, 9216, 12288
Offset: 1

Views

Author

Michel Lagneau, Feb 12 2010

Keywords

Comments

We prove that the solutions of 4^x + 4^y + 4^z = k^2 are (x,y,2y-x-1), for any arbitrary integer x,y. We calculate z. 4^x + 4^y + 4^z is square if positive integers m and odd integer t are such as : 1 + 4^(y-x) + 4^(z-x) = (1 + t*2^m)^2, that's why : (1 + 4^(z-y)*( 4^(y-x)) = t(1 + t*2^(m+1)) t.2^(m+1), and then m = 2y - 2x - 1. If we report this value in the precedent equation, we obtain : t-1 = (2^(z-2y+x+1) + t)(2^(z-2y+x+1) - t) * 4^(y-x-1). Because t is odd, z = 2y - x - 1. Finally, this values gives the square (2^x + 2^(2y-x-1))^2 = k^2.
From Frederik P.J. Vandecasteele, Jun 06 2025: (Start)
For a given n, the exponents are x = A384688(n-1), y = A138099(n), z = A000267(n-1) so that a(n) = 2^A384688(n-1) + 2^A000267(n-1).
Terms are all and only those k whose binary expansion is two 1 bits an odd distance apart. (End)

Examples

			x = 0, y = 1 then z = 1, and k = 3.
x = 1, y = 2 then z = 2, and k = 6.
x = 0, y = 2 then z = 3, and k = 9.
		

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976.
  • J. M. De Koninck, A. Mercier, 1001 problèmes en théorie classique des nombres. Ellipses, 2004.
  • H. N. Shapiro, Introduction to the Theory of Numbers, John Wiley & Sons, 1983.

Crossrefs

Cf. A263132.
Subsequence of A018900.

Programs

  • Maple
    for x from 0 to 1000 do :for y from x to 1000 do: n := evalf(2^x + 2^(2*y-x-1)): print (n) ; od :od :
  • Mathematica
    Take[Union[Select[Sqrt[Flatten[Table[(2^x + 2^(2*y - x - 1))^2, {x, 0, 13}, {y, 0, 13}]]], IntegerQ]],49] (* Jean-François Alcover, Sep 13 2011 *)

Formula

k = 2^x + 2^(2y-x-1), and z = 2y - x - 1.
Conjecture: a(n) = 3*A263132(n). - George Beck, May 05 2021

A239718 Primes of the form m = 8^i + 8^j - 1, where i > j >= 0.

Original entry on oeis.org

71, 4159, 32831, 262151, 266239, 294911, 2101247, 18874367, 134479871, 1073741831, 68721573887, 549755813951, 4398046515199, 4398046543871, 4398046773247, 4398063288319, 281474976711167, 281474976743423, 281474978807807, 281474993487871, 282024732524543
Offset: 1

Views

Author

Hieronymus Fischer, Apr 14 2014

Keywords

Comments

The base-8 representation of a term 8^i + 8^j - 1 has base-8 digital sum = 1 + 7*j == 1 (mod 7).
In base-8 representation the first terms are 107, 10077, 100077, 1000007, 1007777, 1077777, 10007777, 107777777, 1000777777, 10000000007, 1000007777777, 10000000000077, 100000000007777, ...
Numbers m that satisfy m = 8^i + 8^j - 1 with odd i and j are not terms. Example: 33279 = 8^5 + 8^3 - 1 = 3*11093.

Examples

			a(1) = 71, since 71 = 8^2 + 8^1 - 1 is prime.
a(2) = 4159, since 4159 = 8^4 + 8^2 - 1 is prime.
		

Crossrefs

Cf. A018900, A239709, A239712 (base 2), A239713 (base 3), A239714 (base 4), A239715 (base 5), A239716 (base 6), A239717 (base 7), A239719 (base 9), A239720 (base 10).

Programs

  • Maple
    select(isprime, [seq(seq(8^i+8^j-1, j=0..i-1), i=1..25)])[];  # Alois P. Heinz, Dec 22 2024
  • Smalltalk
    A239718
      "Answers an array of the first n terms of A239718.
      Uses method primesWhichAreDistinctPowersOf: b withOffset: d from A239712.
    Usage: n A239718
    Answer: #(71 4159 ... ) [a(1) ... a(n)]"
      ^self primesWhichAreDistinctPowersOf: 8 withOffset: -1

A242100 Numbers of the form m = b^i + b^j, where b > 1 and i > j > 0.

Original entry on oeis.org

6, 10, 12, 18, 20, 24, 30, 34, 36, 40, 42, 48, 56, 66, 68, 72, 80, 84, 90, 96, 108, 110, 130, 132, 136, 144, 150, 156, 160, 182, 192, 210, 222, 240, 246, 252, 258, 260, 264, 270, 272, 288, 306, 320, 324, 342, 350, 380, 384, 392, 420, 462, 506, 514, 516, 520
Offset: 1

Views

Author

Hieronymus Fischer, May 04 2014

Keywords

Comments

If m is a term, then there is a base b > 1 such that the base-b representation of m has digital sum = 2.
The base b for which m = b^i + b^j is not uniquely determined. Example: 12 = 2^3+2^2 = 3^2 +3^1.

Examples

			a(1)    = 6, since 2 = 2^2 + 2^1.
a(7)    = 30, since 30 = 3^3 + 3^1.
a(10)   = 40.
a(10^2) = 1722.
a(10^3) = 377610.
a(10^4) = 70635620.
a(10^5) = 8830078992.
a(10^6) = 951958292172.
a(10^7) = 97932587392010.
a(10^8) = 9908034917287656.
a(10^9) = 995834160614903742.
		

Crossrefs

Programs

  • Smalltalk
    distinctPowersWithOffset: d
      "Answers an array which holds the first n numbers of the form b^i + b^j + d, i>j>0, where b is any natural number > 1, d is any integer number, and n is the receiver (d=0 for this sequence).
      Usage: n distinctPowersWithOffset: 0
      Answer: #(6 10 12 ...) [first n terms]"
      | n terms m |
      terms := SortedCollection new.
      n := self.
      m := n squared max: 20.
      terms := m floorDistinctPowersWithOffset: d.
      ^terms copyFrom: 1 to: n
    ----------
    floorDistinctPowersWithOffset: d
      "Answers an array which holds the numbers < n of the form b^i + b^j + d, i>j>0, where b is any natural number > 1, d is any integer number, and n is the receiver (d=0 for this sequence).
      Usage: n floorDistinctPowersWithOffset: 0
      Answer: #(6 10 12 18 ...) [all terms < n]"
      | bmax p q n m terms a |
      terms := OrderedCollection new.
      n := self.
      bmax := ((4 * (n - d) + 1) sqrtTruncated - 1) // 2.
      2 to: bmax
        do:
             [:b |
             p := b * b.
             q := b.
             a := p + q + d.
             [a < n] whileTrue:
                       [[q < p and: [a < n]] whileTrue:
                                [terms add: a.
                                q := b * q.
                                a := p + q + d].
                       p := b * p.
                       q := b.
                       a := p + q + d]].
      ^terms asSet asOrderedCollection sorted

Formula

a(n) < n^2 for n > 4.
lim a(n)/n^2 = 1, for n --> infinity.

A271709 Table T(n,k) = 2^n + 2^k read by antidiagonals.

Original entry on oeis.org

2, 3, 3, 5, 4, 5, 9, 6, 6, 9, 17, 10, 8, 10, 17, 33, 18, 12, 12, 18, 33, 65, 34, 20, 16, 20, 34, 65, 129, 66, 36, 24, 24, 36, 66, 129, 257, 130, 68, 40, 32, 40, 68, 130, 257, 513, 258, 132, 72, 48, 48, 72, 132, 258, 513, 1025, 514, 260, 136, 80, 64, 80, 136
Offset: 0

Views

Author

Peter Kagey, Apr 12 2016

Keywords

Comments

n > 1 is in this sequence if and only if it is in A018900 or A000079.

Examples

			a(0) = T(0, 0) = 2^0 + 2^0 = 2
a(1) = T(1, 0) = 2^1 + 2^0 = 3
   2,   3,   5,   9,  17,  33,  65, 129, 257, 513,1025,
   3,   4,   6,  10,  18,  34,  66, 130, 258, 514,1026,
   5,   6,   8,  12,  20,  36,  68, 132, 260, 516,1028,
   9,  10,  12,  16,  24,  40,  72, 136, 264, 520,1032,
  17,  18,  20,  24,  32,  48,  80, 144, 272, 528,1040,
  33,  34,  36,  40,  48,  64,  96, 160, 288, 544,1056,
  65,  66,  68,  72,  80,  96, 128, 192, 320, 576,1088,
 129, 130, 132, 136, 144, 160, 192, 256, 384, 640,1152,
 257, 258, 260, 264, 272, 288, 320, 384, 512, 768,1280,
 513, 514, 516, 520, 528, 544, 576, 640, 768,1024,1536,
1025,1026,1028,1032,1040,1056,1088,1152,1280,1536,2048,
		

Crossrefs

Programs

  • Maple
    A271709 := proc(n,k)
        2^n+2^k ;
    end proc: # R. J. Mathar, Apr 15 2016
  • Mathematica
    Table[2^(n - k) + 2^k, {n, 0, 10}, {k, 0, n}] // Flatten (* Michael De Vlieger, Apr 12 2016 *)
  • PARI
    T(n, k) = 2^n + 2^k;
    matrix(10, 10, n, k, n--;k--;T(n,k)) \\ Michel Marcus, Apr 12 2016

Formula

T(n,k) = T(k,n) = A173786(n,k). - R. J. Mathar, Apr 15 2016

A271710 Table T(n,k) = 2^n XOR 2^k read by antidiagonals, where XOR is the binary exclusive or operator.

Original entry on oeis.org

0, 3, 3, 5, 0, 5, 9, 6, 6, 9, 17, 10, 0, 10, 17, 33, 18, 12, 12, 18, 33, 65, 34, 20, 0, 20, 34, 65, 129, 66, 36, 24, 24, 36, 66, 129, 257, 130, 68, 40, 0, 40, 68, 130, 257, 513, 258, 132, 72, 48, 48, 72, 132, 258, 513, 1025, 514, 260, 136, 80, 0, 80, 136, 260
Offset: 0

Views

Author

Peter Kagey, Apr 12 2016

Keywords

Comments

n > 1 is in this sequence if and only if it is in A018900.

Examples

			a(0) = T(0, 0) = 2^0 XOR 2^0 = 0.
a(1) = T(1, 0) = 2^1 XOR 2^0 = 3.
   0,   3,   5,   9,  17,  33,  65, 129, 257, 513,1025,
   3,   0,   6,  10,  18,  34,  66, 130, 258, 514,1026,
   5,   6,   0,  12,  20,  36,  68, 132, 260, 516,1028,
   9,  10,  12,   0,  24,  40,  72, 136, 264, 520,1032,
  17,  18,  20,  24,   0,  48,  80, 144, 272, 528,1040,
  33,  34,  36,  40,  48,   0,  96, 160, 288, 544,1056,
  65,  66,  68,  72,  80,  96,   0, 192, 320, 576,1088,
 129, 130, 132, 136, 144, 160, 192,   0, 384, 640,1152,
 257, 258, 260, 264, 272, 288, 320, 384,   0, 768,1280,
 513, 514, 516, 520, 528, 544, 576, 640, 768,   0,1536,
1025,1026,1028,1032,1040,1056,1088,1152,1280,1536,   0,
		

Crossrefs

Cf. A271709.

Programs

  • Maple
    read("transforms") ;
    A271710 := proc(n,k)
        XORnos(2^n,2^k) ;
    end proc: # R. J. Mathar, Apr 15 2016
  • Mathematica
    Table[BitXor[2^(n - k), 2^k], {n, 0, 10}, {k, 0, n}] // Flatten (* Michael De Vlieger, Apr 12 2016 *)
  • PARI
    T(n, k) = bitxor(2^n, 2^k);
    matrix(10, 10, n, k, n--; k--; T(n,k)) \\ Michel Marcus, Apr 12 2016

Formula

T(n, k) = 0 if n = k.
T(n, k) = A271709(n, k) if n != k.

A325122 Sum of binary digits of the prime indices of n, minus Omega(n).

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 2, 0, 0, 1, 0, 1, 1, 0, 2, 1, 0, 0, 1, 1, 2, 0, 1, 2, 1, 0, 1, 0, 1, 1, 2, 0, 2, 1, 1, 1, 3, 0, 0, 2, 2, 1, 0, 0, 2, 0, 0, 1, 1, 1, 1, 2, 0, 0, 2, 1, 2, 2, 1, 1, 1, 0, 2, 1, 2, 0, 1, 1, 2, 1, 0, 2, 3, 0, 3, 2, 1
Offset: 1

Views

Author

Gus Wiseman, Mar 29 2019

Keywords

Comments

The sum of binary digits of an integer is the number of 1's in its binary representation. A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Crossrefs

Positions of zeros are A318400.
Other totally additive sequences: A056239, A302242, A318994, A318995, A325033, A325034, A325120, A325121.

Programs

  • Mathematica
    Table[Sum[pr[[2]]*(DigitCount[PrimePi[pr[[1]]],2,1]-1),{pr,If[n==1,{},FactorInteger[n]]}],{n,100}]

Formula

Totally additive with a(prime(n)) = A048881(n).

A325984 Lexicographically earliest sequence of distinct nonnegative terms such that for any n >= 0, the sum of digits of n in base 2 equals the sum of digits of a(n) in base 3.

Original entry on oeis.org

0, 1, 3, 2, 9, 4, 6, 5, 27, 10, 12, 7, 18, 11, 13, 8, 81, 28, 30, 15, 36, 19, 21, 14, 54, 29, 31, 16, 33, 20, 22, 17, 243, 82, 84, 37, 90, 39, 45, 24, 108, 55, 57, 32, 63, 34, 38, 23, 162, 83, 85, 40, 87, 42, 46, 25, 91, 48, 56, 35, 58, 41, 43, 26, 729, 244
Offset: 0

Views

Author

Rémy Sigrist, May 30 2019

Keywords

Comments

This sequence is a permutation of the nonnegative integers, with inverse A325985.
The first known fixed points are: 0, 1, 6 and 129936.
We can generalize this sequence for any pair of bases > 1, say u and v:
- let f_{u,v} be the lexicographically earliest sequence of distinct nonnegative terms such that for any n >= 0, the sum of digits of n in base u equals the sum of digits of f_{u,v}(n) in base v,
- in particular f_{2,3} = a (this sequence) and f_{3,2} = A325985,
- f_{u,v} is a permutation of the nonnegative integers, with inverse f_{v,u},
- f_{u,v}(u^k) = v^k for any k >= 0,
- f_{u,u} is the identity function,
- f_{u,v} o f_{v,w} = f_{u,w} (where o denotes function composition).

Examples

			The first terms, alongside the binary representation of n and the ternary representation of a(n), are:
  n   a(n)  bin(n)  ter(a(n))
  --  ----  ------  ---------
   0     0       0          0
   1     1       1          1
   2     3      10         10
   3     2      11          2
   4     9     100        100
   5     4     101         11
   6     6     110         20
   7     5     111         12
   8    27    1000       1000
   9    10    1001        101
  10    12    1010        110
  11     7    1011         21
  12    18    1100        200
  13    11    1101        102
  14    13    1110        111
  15     8    1111         22
  16    81   10000      10000
		

Crossrefs

Programs

  • Mathematica
    a[0] = 0; a[n_] := a[n] = Module[{s = DigitCount[n, 2, 1], k = 1}, While[! FreeQ[Array[a, n - 1], k] || Plus @@ IntegerDigits[k, 3] != s, k++]; k]; Array[a, 66, 0] (* Amiram Eldar, Jul 25 2023 *)
  • PARI
    See Links section.

Formula

a(2^k) = 3^k for any k >= 0.
A000120(n) = A053735(a(n)).
a(A018900(k)) = A055235(k-1) for any k > 0.

A327373 BII-numbers of complete simple graphs.

Original entry on oeis.org

0, 1, 4, 52, 2868, 9112372, 141334497921844, 39614688284139543691484924724, 3138550868424102398255194438067307501961665532948002835252, 19701003098197239607207513568280927372312554341759233318802451615112823176074440555010583132712036457851366790597428
Offset: 0

Views

Author

Gus Wiseman, Sep 04 2019

Keywords

Comments

A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793. We define the set-system with BII-number n to be obtained by taking the binary indices of each binary index of n. Every set-system (finite set of finite nonempty sets) has a different BII-number. For example, 18 has reversed binary expansion (0,1,0,0,1), and since the binary indices of 2 and 5 are {2} and {1,3} respectively, the BII-number of {{2},{1,3}} is 18. Elements of a set-system are sometimes called edges.

Crossrefs

BII-numbers of uniform set-systems are A326783.
BII-numbers of maximal uniform set-systems are A327080.
BII-numbers of maximal uniform normal set-systems are A327081.

Programs

  • Mathematica
    Table[If[n==1,1,Total[2^(Total[2^#]/2&/@Subsets[Range[n],{2}])]/2],{n,0,10}]

A333762 Fixed points of A333692.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 17, 18, 20, 21, 24, 28, 30, 31, 32, 33, 34, 36, 40, 42, 48, 55, 56, 60, 62, 63, 64, 65, 66, 68, 72, 73, 80, 84, 85, 96, 103, 110, 112, 120, 124, 126, 127, 128, 129, 130, 132, 136, 144, 146, 160, 168, 170, 181
Offset: 1

Views

Author

Rémy Sigrist, Apr 04 2020

Keywords

Comments

For any n >= 0, n belongs to this sequence iff 2*n also belongs to this sequence.
This sequence contains A000079, A000225, A018900, A023758, A295235.

Crossrefs

Programs

  • PARI
    is(n, base=2)={ my (b=digits(n, base), p=[]); for (k=1, #b, p=concat(p, b[k]); if (b[k], p=Vecrev(p))); n==fromdigits(p, base) }

A359369 a(1) = 1. Thereafter a(n) = Sum_{j=1..n} {b(a(j)), where b(a(j)) = b(a(n))}, and b is A000120.

Original entry on oeis.org

1, 1, 2, 3, 2, 4, 5, 4, 6, 6, 8, 7, 3, 10, 12, 14, 6, 16, 8, 9, 18, 20, 22, 9, 24, 26, 12, 28, 15, 4, 10, 30, 8, 11, 18, 32, 12, 34, 36, 38, 21, 24, 40, 42, 27, 12, 44, 30, 16, 13, 33, 46, 20, 48, 50, 36, 52, 39, 24, 54, 28, 42, 45, 32, 14, 48, 56, 51, 36, 58, 40, 60, 44, 54, 48, 62, 5
Offset: 1

Views

Author

David James Sycamore, Dec 28 2022

Keywords

Comments

In other words, if k numbers having weight w have occurred, the most recent being a(n-1), then a(n) = k*w. Consequently every integer m > 1 appears A000005(m) times. Whilst there are > 2 ways composite number m may appear, there are only two ways for prime p. The first is consequent to the p_th occurrence of a power of 2. The final appearance of any number m is consequent to the first term in the sequence whose weight is m. For this reason final occurrences are very much delayed.
1 appears twice since A000120(1) = 1, the only fixed point in A000120.
First occurrences of primes are in natural order.
It appears that a(n) <= n, with equality at fixed points 1, 26, 28, ...
The plots have a curious net-like structure.
From Michael De Vlieger, Dec 29 2022: (Start)
a(186) = 188, and for n <= 2^20, there are 694462 occasions of a(n) > n.
Let w(n) = A000120(n) and let c_w(k) be the number of k in this sequence with binary weight w(k). Then this sequence consists of the recursive mapping of f(n) = w(a(n-1)) * c_w(a(n-1)).
Since f(n) is a product of 2 positive numbers, a(n) is odd iff both w(a(n-1)) and c_w(a(n-1)) are odd.
Let S_m = { k : w(k) = m }, thus, S_0 = {0}, S_1 = A000079, S_2 = A018900, S_3 = A014311, etc., with least element (2^m)-1 for m > 0.
Let trajectory T_m comprise a(j) such that w(a(j)) = m. Then a(j) is in S_m.
If the a(j) in T_m appear in order of j, then T_m(1) is such that c_m = 1, T_m(2) is such that c_m = 2, and generally c_m(T_m(k)) = k.
This sequence is composed of trajectories T_m evident in scatterplot. (End)

Examples

			1 appears twice only, first as given starting term a(1), then as a(2) = 1.
a(7) = 5, consequent to a(6)=4, the 5th term so far with binary weight = 1.
a(77) = 5, consequent to a(76) = 62, the first occurrence of a term with binary weight = 5. These are the only occurrences of 5 in the sequence.
The first occurrence of 8 is a(11), following a(10) = 6, the fourth term with weight 2.
a(11) = 8 is the 7th term with weight 1, and a(12) is the first occurrence of 7.
		

Crossrefs

Programs

  • Mathematica
    Block[{a, c, f, k, nn}, nn = 76; c[] = 0; a[1] = 1; f[n] := DigitCount[n, 2, 1]; Do[Set[k, ( c[#]++; # c[#]) &[f[#]]] &@a[n - 1]; Set[a[n], k], {n, 2, nn}]; Array[a, nn] ] (* Michael De Vlieger, Dec 28 2022 *)
Previous Showing 61-70 of 77 results. Next