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

A027434 a(1) = 2; then defined by property that a(n) = smallest number >= a(n-1) such that successive runs have lengths 1,1,2,2,3,3,4,4.

Original entry on oeis.org

2, 3, 4, 4, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18
Offset: 1

Views

Author

Sam Speed (SPEEDS(AT)msci.memphis.edu)

Keywords

Comments

Also the sequence of first skipped terms for Beatty sequences in the family alpha = 1+sqrt(n)-sqrt(n-1). - Alisa Ediger, Jul 20 2016
Optimal cost for one-dimensional Racetrack over a distance n. - Jason Schoeters, Aug 18 2021
If b > 0 and c > 0 are the integer coefficients of a monic quadratic x^2 + b*x + c, it has integer roots if its discriminant d^2 = b^2 - 4c is a perfect square. This sequence is the values of b for increasing b sorted by b then c. The first pair of (b, c) = (2, 1) and has d = A082375(0) = 0. The n-th pair of (b, c) = (a(n), A350634(n)) and has d = A082375(n-1). - Frank M Jackson, Jan 21 2024

References

  • Sam Speed, An integer sequence (preprint).

Crossrefs

Programs

  • Haskell
    a027434 = (+ 1) . a000196 . (subtract 3) . (* 4)
    a027434_list = 2 : concat (map (\x -> replicate (x `div` 2) x) [3..])
    -- Reinhard Zumkeller, Mar 23 2013, Nov 22 2011
    
  • Maple
    A027434:=n->ceil(2*sqrt(n)); seq(A027434(n), n=1..100); # Wesley Ivan Hurt, Mar 01 2014
  • Mathematica
    Table[Ceiling[2*Sqrt[n]], {n, 100}] (* Wesley Ivan Hurt, Mar 01 2014 *)
    Sort[Flatten[Table[#,{#[[1]]/2}]]]&/@Partition[Range[2,20],2]//Flatten (* Harvey P. Dale, Sep 05 2019 *)
    lst = {}; Do[If[IntegerQ[d=Sqrt[b^2-4 c]], AppendTo[lst, b]], {b, 1, 20}, {c, 1, b^2/4}]; lst (* Frank M Jackson, Jan 21 2024 *)
  • PARI
    a(n)=sqrtint(4*n-3)+1 \\ Charles R Greathouse IV, Feb 07 2012
    
  • Python
    from math import isqrt
    def A027434(n): return 1+isqrt((n<<2)-1) # Chai Wah Wu, Jul 27 2022

Formula

a(n) = 1 + floor( sqrt(4*n-3) ) = 1+A000267(n-1).
a(n) = A049068(n) - n.
a(n) = A027709(n)/2. - Tanya Khovanova, Mar 04 2008
a(n) = ceiling(2*sqrt(n)). [Mircea Merca, Feb 07 2012]
a(n) = floor(1+sqrt(n)+sqrt(n-1)). - Alisa Ediger, Jul 20 2016
G.f.: x*(1 + x^(-1/4)*theta_2(x) + theta_3(x))/(2*(1 - x)), where theta_k(x) is the Jacobi theta function. - Ilya Gutkovskiy, Jul 20 2016
a(n) = 1 + floor(sqrt(4*n-1)). - Chai Wah Wu, Jul 27 2022
a(n) = sqrt((A082375(n))^2 + 4*A350634(n+1)). - Frank M Jackson, Jan 21 2024

Extensions

More terms from Courtney Clipp (cclipp(AT)ashland.edu), Dec 08 2004

A025644 Exponent of 3 (value of i) in n-th number of form 3^i*10^j.

Original entry on oeis.org

0, 1, 2, 0, 3, 1, 4, 2, 0, 5, 3, 1, 6, 4, 2, 0, 7, 5, 3, 1, 8, 6, 4, 2, 0, 9, 7, 5, 3, 1, 10, 8, 6, 4, 2, 0, 11, 9, 7, 5, 3, 1, 12, 10, 8, 6, 4, 2, 0, 13, 11, 9, 7, 5, 3, 1, 14, 12, 10, 8, 6, 4, 2, 0, 15, 13, 11, 9, 7, 5, 3, 1, 16, 14, 12, 10, 8, 6, 4, 2, 0, 17, 15, 13, 11, 9, 7, 5, 3, 1, 18, 16, 14, 12, 10
Offset: 1

Views

Author

Keywords

Comments

Starts like A082375 but the pattern then becomes more irregular ..5, 3, 1, 22, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2, 23, 0, 21, 19, 17, 15, 13, 11, 9, 7, 5, 3, 24, 1, 22, 20,... - R. J. Mathar, Aug 27 2025

Crossrefs

Cf. A025616.

A181666 Numbers whose odd part is of the form (4^k-1)/3.

Original entry on oeis.org

1, 2, 4, 5, 8, 10, 16, 20, 21, 32, 40, 42, 64, 80, 84, 85, 128, 160, 168, 170, 256, 320, 336, 340, 341, 512, 640, 672, 680, 682, 1024, 1280, 1344, 1360, 1364, 1365, 2048, 2560, 2688, 2720, 2728, 2730, 4096, 5120, 5376, 5440, 5456, 5460, 5461, 8192, 10240
Offset: 1

Views

Author

Ralf Stephan, Nov 18 2010

Keywords

Comments

Also numbers that need at most one (3x+1) operation to reach 1 in the Collatz conjecture.
Also, terms of A023758 divisible by 3, divided by 3 (conjectured).

Crossrefs

Programs

  • Mathematica
    Select[Range[2600], IntegerQ@ Log[4, 3 # + 1] &@ NestWhile[#/2 &, #, IntegerQ[#/2] &] &] (* Michael De Vlieger, May 12 2017 *)
    seq[max_] := Module[{kmax = Floor[Log[4, 3*max+1]], s = {}, s1, odd},Do[odd = (4^k-1)/3; s1 = 2^Range[0, Floor[Log2[max/odd]]] * odd; s = Join[s, s1], {k, 1, kmax}]; Union[s]]; seq[10240] (* Amiram Eldar, Aug 31 2024 *)
  • PARI
    for(n=2, 2000, o=3*n/2^valuation(n,2)+1; b=ispower(o); if(b&&round(sqrtn(o,b\2))==4, print1(n, ", ")))
    
  • Python
    for a in range(2, 17):
        print()
        for b in range(a - 2, -1, -2):
            print(((1 << a) - (1 << b)) // 3, end=", ")
    # André Hallqvist, Jul 25 2019
    # This script shows the sequence as an irregular table whose main diagonal is A000975, called the "Lichtenberg sequence" by Andreas M. Hinz. - Peter Luschny, Jul 10 2022

Formula

a(n) = (4 * 2^A055086(n-1) - 2^A082375(n-1))/3. - André Hallqvist, Jul 17 2019
Sum_{n>=1} 1/a(n) = 2 * A321873 = 2.5265861162... . - Amiram Eldar, Jul 19 2022

A350634 Products of the parts s,t in each partition of k (= 2,3,...) into two parts, ordered by increasing k and then by increasing values of s*t (see example).

Original entry on oeis.org

1, 2, 3, 4, 4, 6, 5, 8, 9, 6, 10, 12, 7, 12, 15, 16, 8, 14, 18, 20, 9, 16, 21, 24, 25, 10, 18, 24, 28, 30, 11, 20, 27, 32, 35, 36, 12, 22, 30, 36, 40, 42, 13, 24, 33, 40, 45, 48, 49, 14, 26, 36, 44, 50, 54, 56, 15, 28, 39, 48, 55, 60, 63, 64, 16, 30, 42, 52, 60, 66, 70, 72
Offset: 1

Views

Author

Wesley Ivan Hurt, Jan 09 2022

Keywords

Comments

If b > 0 and c > 0 are the integer coefficients of a monic quadratic x^2 + b*x + c, it has integer roots if its discriminant d^2 = b^2 - 4c is a perfect square. This sequence is the values of c for increasing b sorted by b then c. The first pair of (b, c) = (2, 1) and has d = 0. The n-th pair of (b, c) = (A027434(n),a(n)) and has d = A082375(n-1). - Frank M Jackson, Jan 22 2024

Examples

			---------------------------------------------------------------------------
The products of the parts start: 1*1, 1*2, 1*3, 2*2, 1*4, 2*3, etc., which are precisely the values of a(n): 1, 2, 3, 4, 4, 6, ...
                                                                     [1,9]
                                                     [1,7]   [1,8]   [2,8]
                                     [1,5]   [1,6]   [2,6]   [2,7]   [3,7]
                     [1,3]   [1,4]   [2,4]   [2,5]   [3,5]   [3,6]   [4,6]
     [1,1]   [1,2]   [2,2]   [2,3]   [3,3]   [3,4]   [4,4]   [4,5]   [5,5]
  k    2       3       4       5       6       7       8       9      10
---------------------------------------------------------------------------
		

Crossrefs

Programs

  • Mathematica
    Times@@@Flatten[Table[IntegerPartitions[k, {2}], {k, 2, 100}], 1] (* Frank M Jackson, Jan 22 2024 *)
    lst={}; Do[If[IntegerQ[d=Sqrt[b^2-4c]], AppendTo[lst, c]], {b, 1, 100}, {c, 1, b^2/4}]; lst (* Frank M Jackson, Jan 22 2024 *)

Formula

a(n) = A122197(n) * A199474(n).
a(n) = A339399(2n-1) * A339399(2n).
a(n) = ((A027434(n))^2 - (A082375(n))^2)/4. - Frank M Jackson, Jan 22 2024

A237444 Triangle read by rows, T(n,k) is difference of column sum and row sum of natural numbers filled in n x n square.

Original entry on oeis.org

0, 1, -1, 6, 0, -6, 18, 6, -6, -18, 40, 20, 0, -20, -40, 75, 45, 15, -15, -45, -75, 126, 84, 42, 0, -42, -84, -126, 196, 140, 84, 28, -28, -84, -140, -196, 288, 216, 144, 72, 0, -72, -144, -216, -288, 405, 315, 225, 135, 45, -45, -135, -225, -315, -405, 550, 440, 330, 220, 110, 0, -110, -220, -330, -440, -550, 726, 594, 462, 330, 198, 66, -66
Offset: 1

Views

Author

Kival Ngaokrajang, Feb 08 2014

Keywords

Comments

See illustration in links for construction rule.
Column 1 = A002411.
Column 2 = A005564 ,for n >= 3.
Column 3 first differences = A140091.
Nonnegative numbers of this sequence are given by A082375(n,k)*A000217(n), (see example). - Philippe Deléham, Feb 08 2014

Examples

			Triangle begins:
n/k   1   2   3   4  5    6   7    8    9   ...
1   0
2   1  -1
3   6   0  -6
4  18   6  -6  18
5  40  20   0 -20 -40
6  75  45  15 -15 -45 -75
7 126  84  42   0 -42 -84 -126
8 196 140  84  28 -28 -84 -140 -196
9 288 216 144  72   0 -72 -144 -216 -288  ...
...
A082375 begins:
0;
1;
2, 0;
3, 1;
4, 2, 0;
5, 3, 1;
6, 4, 2, 0;
7, 5, 3, 1;
8, 6, 4, 2, 0;
9, 7, 5, 3, 1;
.....
A000217 (triangular numbers) begins:
0, 1, 3, 6, 10, 15, 21, 28, 36, 45, ...
A082375(n,k)*A000217(n) begins:
0;
1;
6, 0;
18, 6;
40, 20, 0;
75, 45, 15;
126, 84, 42, 0;
196, 140, 84, 28;
288, 216, 144, 72, 0;
405, 315, 225, 135, 45;
... - _Philippe Deléham_, Feb 08 2014
		

Crossrefs

Formula

T(n,k) = - T(n,n-k+1), T(2n+1,n+1)= 0. - Philippe Deléham, Feb 08 2014
T(n+1,k+1) = A114327(n,k)*A000217(n). - Philippe Deléham, Feb 08 2014

A370308 Values d for the discriminant d^2 = 4*p^3 - 27*q^2 of the depressed cubic equation x^3 - p*x + q = 0 that give integer roots using integer coefficients p > 0 and q > 0 for increasing p sorted by p then q.

Original entry on oeis.org

0, 20, 0, 70, 56, 162, 0, 160, 308, 110, 324, 520, 0, 286, 560, 810, 182, 540, 880, 1190, 0, 448, 884, 1296, 1672, 272, 810, 1330, 1820, 0, 646, 2268, 1280, 1890, 2464, 380, 1134, 2990, 1870, 2576, 3240, 0, 880, 1748, 2592, 3850, 3400, 506, 1512
Offset: 1

Views

Author

Frank M Jackson, Feb 14 2024

Keywords

Comments

To obtain integer roots from the depressed cubic x^3 - p*x + q = 0, its discriminant 4*p^3 - 27*q^2 has to be a perfect square but this is not a sufficient condition. At least one root has to be integral as well.

Examples

			a(1) = 0 and occurs when (p, q) = (3, 2). The depressed cubic is x^3 - 3*x + 2 and has roots {-2, 1, 1}.
a(2) = 20 and occurs when (p, q) = (7, 6). The depressed cubic is x^3 - 7*x + 6 and has roots {-3, 1, 2}.
a(3) = 0 and occurs when (p, q) = (12, 16). The depressed cubic is x^3 - 12*x + 16 and has roots {-4, 2, 2}.
a(4) = 70 and occurs when (p, q) = (13, 12). The depressed cubic is x^3 - 13*x + 12 and has roots {-4, 1, 3}.
		

Crossrefs

Cf. A082375.

Programs

  • Mathematica
    lst = {}; Do[If[IntegerQ[k=(4p^3-27q^2)^(1/2)], (sol=Solve[x^3-p*x+q==0, {x}]; {x1, x2, x3}=x /. sol; If[IntegerQ[x1], AppendTo[lst, k]])], {p, 1, 300}, {q, 1, Sqrt[4 p^3/27]}]; lst

A380544 Numbers of the form A073138(k) XOR A038573(k).

Original entry on oeis.org

0, 3, 5, 9, 15, 17, 27, 33, 51, 63, 65, 99, 119, 129, 195, 231, 255, 257, 387, 455, 495, 513, 771, 903, 975, 1023, 1025, 1539, 1799, 1935, 2015, 2049, 3075, 3591, 3855, 3999, 4095, 4097, 6147, 7175, 7695, 7967, 8127, 8193, 12291, 14343, 15375, 15903, 16191, 16383, 16385
Offset: 1

Views

Author

Keywords

Comments

The plot of the sequence has a blancmange appearance. The discontinuities in the curve are at a(n) = k^2 + 1.
The bit length of a(n+1) appears to be A000267(n)+1.
The number of 0-bits in the binary expansion of a(n+1) appears to be A082375(n).

Examples

			k = 17. A073138(17) = 24 = 11000_2. A038573(17) = 3 = 00011_2. 11000_2 XOR 00011_2 = 11011_2 = 27. 27 is a term.
		

Crossrefs

Subsequence of A006995.

Programs

  • Mathematica
    s[n_, k_] := (2^n-1)*(2^(k-n)+1); Join[{0}, Table[s[n, k], {k, 2, 15}, {n, 1, Floor[k/2]}] // Flatten] (* Amiram Eldar, Jun 23 2025 *)
  • PARI
    a8(n) = fromdigits(vecsort(binary(n), , 4), 2);
    a3(n) = 2^hammingweight(n)-1;
    lista(nn) = Set(vector(nn, n, bitxor(a3(n), a8(n)))); \\ Michel Marcus, Jun 23 2025

Extensions

More terms from Michel Marcus, Jun 23 2025
Showing 1-7 of 7 results.