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.

User: David Rabahy

David Rabahy's wiki page.

David Rabahy has authored 4 sequences.

A378628 SHA-256 hash of binary strings ordered by length then lexicographically, interpreting the bits of the resulting hash as a number in binary.

Original entry on oeis.org

102987336249554097029535212322581322789799900648198034993379397001115665086549, 85627803894273957621009139791088467240572419248799306945317937552975942820725, 84071438648566403273885734069370854758478523414599514048347910236850479717025, 91949452561369181223012808967964775320445203057864513807052896586217122700773
Offset: 1

Author

David Rabahy, Dec 02 2024

Keywords

Comments

The n-th binary string is the bits of the binary expansion of n after its most significant 1 bit, so beginning from n=1: [empty], 0, 1, 00, 01, 10, 11, 000, 001, 010, ... .
The SHA-256 hash function takes as input a vector of bits, possibly empty, and the resulting hash is 256 bits so that a(n) ranges 0 to 2^256-1 inclusive.
The length of the input bit vector is part of the hash, so initial 0 bits will, in general, result in a different hash.

Examples

			For n = 1, there are no bits after the most significant 1 bit, so a(1) is the SHA-256 hash of the empty string.
For n = 6 = 110_2, the bits after the most significant 1 are 10, so a(5) is the SHA-256 hash of the bits 10.
		

Crossrefs

Programs

  • Python
    # See links
    
  • Python
    from sha256bit import Sha256bit
    def a(n):
        s = bin(n)[3:]
        t = bytearray(int(s[i*8:i*8+8].ljust(8, "0"), 2) for i in range((len(s)+7)//8)) if n > 1 else ""
        return int(Sha256bit(t, bitlen=len(s)).hexdigest(), 16)
    print([a(n) for n in range(1, 5)]) # Michael S. Branicky, Dec 08 2024

A288493 First differences of A006878 (record new trajectory lengths of Collatz function) (Hailstone sequence).

Original entry on oeis.org

1, 6, 1, 8, 3, 1, 3, 88, 1, 3, 3, 3, 3, 3, 3, 13, 1, 26, 8, 3, 1, 26, 8, 21, 24, 6, 8, 3, 3, 26, 3, 13, 16, 11, 3, 21, 8, 3, 57, 6, 21, 39, 16, 3, 3, 26, 3, 3, 21, 13, 16, 52, 21, 3, 3, 13, 1, 39, 205, 1, 3, 3, 8, 1, 21, 1, 13, 8, 42, 37, 44, 1, 21, 31, 26, 3, 6, 1, 8, 6, 8, 13, 52, 1, 13, 3, 8, 3, 13, 8, 52, 3, 26, 3, 3, 106, 1, 13, 3, 3, 16, 3, 13, 16, 21, 13, 8
Offset: 1

Author

David Rabahy, Jun 13 2017

Keywords

Comments

The sequence appears to return to 1 again and again forever when the minimal possible new record of just (previous record + 1) is reached at the latest possible value of 2X. Through 129 there are only 2 entries, a(17) and a(21), that are a minimal new record but aren't 2X.

Examples

			For n = 3 the difference between A006878(4) = 8 and A006878(3) = 7 is 1.
		

Crossrefs

Programs

  • Mathematica
    (* This script is not suitable to compute a large number of terms. *)
    terms = 40; steps[x0_] := steps[x0] = Block[{x = x0, nos = 0}, While[x != 1, If[Mod[x, 2] == 0, x = x/2, x = 3*x + 1]; nos++]; nos]; b[1] = 1; b[n_] := b[n] = Block[{x = b[n - 1] + 1}, record = steps[x - 1]; While[steps[x] <= record, x++]; x];
    A006877 = Table[Print[b[n]]; b[n], {n, 1, terms+1}];
    A006878 = steps /@ A006877;
    Differences[A006878] (* Jean-François Alcover, Jun 15 2017 *)

A259753 For increasing z > 0, integers, y - x, where x^3 + y^3 = z^3 + 1, with y > x > 1.

Original entry on oeis.org

1, 30, 71, 100, 104, 485, 1169, 705, 887, 1727, 421, 775, 4499, 4260, 3180, 5748, 9719, 307, 6092, 18521, 20304, 18825, 32255, 6174, 33082, 7601, 29400, 17607, 13457, 52487, 1727, 44794, 41772, 76328, 1801, 29707, 80999, 119789, 111226, 132105, 122730, 171071, 123117, 237275
Offset: 1

Author

David Rabahy, Jul 21 2015

Keywords

Comments

It seems to me the sequence can never drop all the way to 1 again.
From Robert Israel, Oct 13 2015: (Start)
There are only finitely many n with a(n) = 1.
Such n correspond to solutions of the Diophantine equation x (2 x^2 + 3 x + 3) = z^3.
Since gcd(x, 2 x^2 + 3 x + 3) = 1 or 3, we get two cases:
if x is not divisible by 3, x = s^3, z = s^3 t^3 where 2 s^6 + 3 s^3 + 3 = t^3,
otherwise x = 9 s^3, z = 3 s t, where 54 s^6 + 9 s^3 + 1 = t^3.
The algebraic curves 2 s^6 + 3 s^3 + 3 = t^3 and 54 s^6 + 9 s^3 + 1 = t^3 both have genus 4, so by Faltings's theorem they have only finitely many rational solutions.
(End)

Examples

			10 - 9 = 1 is the first number in the sequence because 10^3 + 9^3 = 12^3 + 1^3 and no other lower z produces a result.
		

Crossrefs

Cf. A001235.
Cf. x = A050792, y = A050793, z = A050791 , x^3+y^3 = A050794.

Programs

  • Maple
    Cubes:= {seq(x^3, x=2..10^4)}:
    count:= 0:
    for z from 1 to 10^4 do
      s:= z^3+1;
      M:= map(t -> s-t, select(`<`,Cubes,floor(s/2))) intersect Cubes;
      for m in M do
        count:= count+1;
        y:= simplify(m^(1/3));
        x:= simplify((s-m)^(1/3));
        A[count]:= y-x;
      od
    od:
    seq(A[i],i=1..count); # Robert Israel, Oct 13 2015
  • Mathematica
    y = 3; lst = {}; While[y < 100001, x = 2; While[x < y, z = (y^3 + x^3 - 1)^(1/3); If[IntegerQ[z], AppendTo[lst, {z, y, x, y - x}]; Print[{z, y, x, y - x}]]; x++]; y++]; Last@ Transpose@ Sort@ lst (* Robert G. Wilson v, Jul 21 2015 and modified Oct 14 2015 *)

Formula

a(n) = A050793(n) - A050792(n). - Robert G. Wilson v, Jul 21 2015

A259836 Integers n where n^3 + (n+1)^3 is a Taxicab number A001235.

Original entry on oeis.org

9, 121, 235, 301, 1090, 1293, 1524, 3152, 8010, 15556, 15934, 19247, 20244, 21498, 24015, 25363, 25556, 45462, 57872, 63758, 80016, 93349, 94701, 101929, 113098, 119942, 132414, 143653, 167147, 186540, 192629, 229508, 246122, 247318, 292154, 307534, 322870
Offset: 1

Author

David Rabahy, Jul 06 2015

Keywords

Examples

			9^3 + 10^3 = 1729 = A001235(1), so 9 is in the sequence.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n)
      local D, b, a, Q;
      D:= numtheory:-divisors(n);
      for b in D do
        a:= n/b;
        Q:= 12*b - 3*a^2;
        if Q > 9 and issqr(Q) and Q < 9*a^2 then return true fi
      od;
      false
    end proc:
    select(x -> filter(x^3 +(x+1)^3), [$1..100000]); # Robert Israel, Jul 07 2015
  • Mathematica
    Select[Range[10000], Length[PowersRepresentations[#^3 + (# + 1)^3, 2, 3]]==2 &] (* Vincenzo Librandi, Jul 10 2015 *)
  • Python
    from _future_ import division
    from gmpy2 import is_square
    from sympy import divisors
    A259836_list = []
    for n in range(10000):
        m = n**3+(n+1)**3
        for x in divisors(m):
            x2 = x**2
            if x2 > m:
                break
            if x != (2*n+1) and m < x*x2 and is_square(12*m//x-3*x2):
                A259836_list.append(n)
                break # Chai Wah Wu, Jan 10 2016