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-4 of 4 results.

A076115 Squares (or 0) from A076114.

Original entry on oeis.org

1, 9, 9, 0, 25, 81, 49, 36, 81, 225, 121, 0, 169, 441, 225, 0, 289, 225, 361, 0, 441, 1089, 529, 324, 400, 1521, 729, 0, 841, 2025, 961, 784, 1089, 2601, 1225, 0, 1369, 3249, 1521, 900, 1681, 3969, 1849, 0, 2025, 4761, 2209, 0, 1225, 2025, 2601, 0, 2809, 2025
Offset: 1

Views

Author

Amarnath Murthy, Oct 09 2002

Keywords

Examples

			a(2) = 4+5 = 9= 3^2. a(8)= 1+2+3+4+5+6+7+8 = 36 = 6^2.
		

Crossrefs

Extensions

More terms from David Wasserman, Apr 02 2005

A131323 Odd numbers whose binary expansion ends in an even number of 1's.

Original entry on oeis.org

3, 11, 15, 19, 27, 35, 43, 47, 51, 59, 63, 67, 75, 79, 83, 91, 99, 107, 111, 115, 123, 131, 139, 143, 147, 155, 163, 171, 175, 179, 187, 191, 195, 203, 207, 211, 219, 227, 235, 239, 243, 251, 255, 259, 267, 271, 275, 283, 291, 299, 303, 307, 315, 319, 323, 331
Offset: 1

Views

Author

Nadia Heninger and N. J. A. Sloane, Dec 16 2007

Keywords

Comments

Also numbers of the form (4^a)*b - 1 with positive integer a and odd integer b. The sequence has linear growth and the limit of a(n)/n is 6. - Stefan Steinerberger, Dec 18 2007
Evil and odious terms alternate. - Vladimir Shevelev, Jun 22 2009
Also odd numbers of the form m = (A079523(k)-1)/2. - Vladimir Shevelev, Jul 06 2009
As a set, this is the complement of A079523 in the odd numbers. - Michel Dekking, Feb 13 2019
From Ctibor O. Zizka, Dec 28 2024: (Start)
Numbers k >= 1 such that (k + 1)*(k + 2*r)/2 is not a square for any r >= 1.
Numbers k such that A076114(k + 1) = 0. (End)

Examples

			11 in binary is 1011, which ends with two 1's.
		

Crossrefs

Programs

  • Maple
    N:= 1000: # to get all terms up to N
    Odds:= [seq(2*i+1,i=0..floor((N-1)/2)]:
    f:= proc(n) local L,x;
       L:= convert(n,base,2);
       x:= ListTools:-Search(0,L);
       if x = 0 then type(nops(L),even) else type(x,odd) fi
    end proc:
    A131323:= select(f,Odds); # Robert Israel, Apr 02 2014
  • Mathematica
    Select[Range[500], OddQ[ # ] && EvenQ[FactorInteger[ # + 1][[1, 2]]] &] (* Stefan Steinerberger, Dec 18 2007 *)
    en1Q[n_]:=Module[{ll=Last[Split[IntegerDigits[n,2]]]},Union[ll] =={1} &&EvenQ[Length[ll]]]; Select[Range[1,501,2],en1Q] (* Harvey P. Dale, May 18 2011 *)
  • PARI
    is(n)=n%2 && valuation(n+1,2)%2==0 \\ Charles R Greathouse IV, Aug 20 2013
    
  • Python
    from itertools import count, islice
    def A131323_gen(startvalue=3): # generator of terms >= startvalue
        return map(lambda n:(n<<1)+1,filter(lambda n:(~(n+1)&n).bit_length()&1,count(max(startvalue>>1,1))))
    A131323_list = list(islice(A131323_gen(),30)) # Chai Wah Wu, Sep 11 2024
    
  • Python
    def A131323(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x):
            c, s = n+x, bin(x+1)[2:]
            l = len(s)
            for i in range(l&1,l,2):
                c -= int(s[i])+int('0'+s[:i],2)
            return c
        return bisection(f,n,n)<<1|1 # Chai Wah Wu, Jan 29 2025

Formula

a(n) = 2*A079523(n) + 1. - Michel Dekking, Feb 13 2019

Extensions

More terms from Stefan Steinerberger, Dec 18 2007

A076116 Start of the smallest string of n consecutive positive numbers with a cube sum, or 0 if no such number exists.

Original entry on oeis.org

1, 13, 8, 0, 23, 2, 46, 0, 20, 8, 116, 0, 163, 18, 218, 6, 281, 32, 352, 0, 431, 50, 518, 0, 28, 72, 14, 0, 827, 98, 946, 0, 1073, 128, 1208, 0, 1351, 162, 1502, 0, 1661, 200, 1828, 0, 53, 242, 2186, 98, 32, 43, 2576, 0, 2783, 36, 2998, 0, 3221, 392, 3452, 0, 3691, 450
Offset: 1

Views

Author

Amarnath Murthy, Oct 09 2002

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n) local y,F,t,k,v;
          if n::odd then
             F:= ifactors(n)[2];
             y:= mul(t[1]^ceil(t[2]/3),t=F);
             k:= 1+floor((n*(n-1)/2)^(1/3)/y);
             (k*y)^3/n - (n-1)/2;
          else
             v:= padic:-ordp(n,2);
             if v mod 3 <> 1 then return 0 fi;
             F:= ifactors(n/2^v)[2];
             y:= mul(t[1]^ceil(t[2]/3),t=F)*2^((v-1)/3);
             k:= 1 + floor((n*(n-1)/2)^(1/3)/y);
             if k::even then k:= k+1 fi;
             (k*y)^3/n - (n-1)/2;
          fi
    end proc:
    map(f, [$1..100]); # Robert Israel, Nov 15 2023
  • Mathematica
    f[n_] := Module[{y, F, t, k, v},
    If[OddQ[n],
       F = FactorInteger[n];
       y = Product[t[[1]]^Ceiling[t[[2]]/3], {t, F}];
       k = 1 + Floor[(n*(n-1)/2)^(1/3)/y];
       (k*y)^3/n - (n-1)/2
    ,
       v = IntegerExponent[n, 2];
       If[Mod[v, 3] != 1, Return[0]];
       F = FactorInteger[n/2^v];
       y = Product[t[[1]]^Ceiling[t[[2]]/3], {t, F}]*2^((v-1)/3);
       k = 1 + Floor[(n*(n-1)/2)^(1/3)/y];
       If[EvenQ[k], k = k+1];
       (k*y)^3/n - (n-1)/2]];
    Map[f, Range[100]] (* Jean-François Alcover, Jul 09 2024, after Robert Israel *)

Formula

From Robert Israel, Nov 15 2023: (Start)
If n is odd, then a(n) is the least positive integer of the form (k*A019555(n))^3/n - (n-1)/2 where k is an integer.
If n is even, then let v = A007814(n). If v == 1 (mod 3) then a(n) is the least positive integer of the form (k*A019555(n/2))^3/n - (n-1)/2 where k an odd integer; otherwise, a(n) = 0. (End)

Extensions

More terms from David Wasserman, Apr 02 2005

A379676 For n >= 0, a(n) is the least k >= 2 such that (n + 1)*(2*k + n) / 2 is a triangular number (A000217).

Original entry on oeis.org

3, 7, 4, 15, 7, 5, 10, 31, 13, 6, 16, 12, 19, 10, 7, 63, 25, 11, 28, 22, 8, 15, 34, 21, 37, 16, 40, 9, 43, 20, 46, 127, 14, 21, 18, 10, 55, 25, 15, 19, 61, 26, 64, 45, 11, 30, 70, 44, 73, 31, 21, 55, 79, 35, 12, 70, 22, 36, 88, 18, 91, 40, 34, 255, 31, 13, 100, 19, 28, 24, 106, 92, 109, 46, 29, 78, 25, 14, 118, 91, 121, 51, 124, 63, 42, 55, 35, 39, 133, 43, 15
Offset: 0

Views

Author

Ctibor O. Zizka, Dec 29 2024

Keywords

Comments

Also for n >= 0, a(n) is the least k >= 2 such that the Sum_{i = 0..n} (k + i) is a triangular number (A000217). For k = 0, 1 the Sum is a triangular number for all n. The sequences A076114 and A076116 are for square sum and cube sum.

Examples

			n = 4: the least k >= 2 such that (4 + 1)*(2*k + 4)/2 = 5*k + 10 is a triangular number is k = 7, thus a(4) = 7.
n = 5: the least k >= 2 such that (5 + 1)*(2*k + 5)/2 = 6*k + 15 is a triangular number is k = 5, thus a(5) = 5.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{k = 2}, While[! IntegerQ[Sqrt[4*(n + 1)*(2*k + n) + 1]], k++]; k]; Array[a, 100, 0] (* Amiram Eldar, Dec 30 2024 *)
  • PARI
    a(n) = my(k=2); while (!ispolygonal((n + 1)*(2*k + n)/2, 3), k++); k; \\ Michel Marcus, Dec 30 2024

Formula

For i >= 0, a(2^i - 1) = 2^(i + 2) - 1, max. values of a(n).
For i >= 0, a(i*(i + 3)/2) = i + 3, min. values of a(n).
For i >= 1, i is not from A083390, a(2*i) = (3*i + 1).
Showing 1-4 of 4 results.