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 31-40 of 85 results. Next

A362248 a(n) is the number of locations 1..n-1 which can reach i=n-1, where jumps from location i to i +- a(i) are permitted (within 1..n-1); a(1)=1. See example.

Original entry on oeis.org

1, 1, 2, 3, 1, 5, 6, 7, 1, 1, 2, 11, 1, 13, 14, 15, 1, 1, 2, 3, 1, 5, 6, 23, 1, 1, 2, 27, 1, 29, 30, 31, 1, 1, 2, 3, 1, 5, 6, 7, 1, 1, 2, 11, 1, 13, 14, 47, 1, 1, 2, 3, 1, 5, 6, 55, 1, 1, 2, 59, 1, 61, 62, 63, 1, 1, 2, 3, 1, 5, 6, 7, 1, 1, 2, 11, 1, 13, 14, 15
Offset: 1

Views

Author

Neal Gersh Tolunsky, May 12 2023

Keywords

Comments

Note that location n-1 itself is counted as a term which can reach i=n-1.
Conjecture: a(n) is also the largest number such that starting point i=n can reach every previous location (with a(1)=1 and the same rule for jumps as in the current name).
A047619 appears to be the indices of 1's in this sequence.
A023758 appears to be the indices of terms for which a(n)=n-1.
A089633 appears to be the distinct values of the sequence (and its complement A158582 the missing values).
The sequence appears to consist of monotonically increasing runs of length 4.
It appears that a(A004767(n))=A100892(n) and a(A016825(n))=A100892(n)-1.

Examples

			a(6)=5 because there are 5 starting terms from which i=5 can be reached:
  1, 1, 2, 3, 1
  1->1->2---->1
We can see that i=1,2,3 and trivially 5 can reach i=5. i=4 can also reach i=5:
  1, 1, 2, 3, 1
  1<-------3
  1->1->2---->1
This is a total of 5 locations, so a(6)=5.
		

Crossrefs

Programs

  • C
    /* See links */

Extensions

a(24) onwards from Kevin Ryde, May 17 2023

A385817 Irregular triangle read by rows listing the lengths of maximal runs (sequences of consecutive elements increasing by 1) of binary indices, duplicate rows removed.

Original entry on oeis.org

1, 2, 1, 1, 3, 2, 1, 1, 2, 4, 1, 1, 1, 3, 1, 2, 2, 1, 3, 5, 2, 1, 1, 1, 2, 1, 4, 1, 1, 1, 2, 3, 2, 2, 3, 1, 4, 6, 1, 1, 1, 1, 3, 1, 1, 2, 2, 1, 1, 3, 1, 5, 1, 2, 1, 2, 1, 2, 2, 4, 2, 1, 1, 3, 3, 3, 2, 4, 1, 5, 7, 2, 1, 1, 1, 1, 2, 1, 1, 4, 1, 1, 1, 1, 2, 1
Offset: 0

Views

Author

Gus Wiseman, Jul 14 2025

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.
This is the triangle A245563, except all duplicates after the first instance of each composition are removed. It lists all compositions in order of their first appearance as a row of A245563.

Examples

			The binary indices of 53 are {1,3,5,6}, with maximal runs ((1),(3),(5,6)), with lengths (1,1,2). After removing duplicates, this is our row 16.
Triangle begins:
   0: .
   1: 1
   2: 2
   3: 1 1
   4: 3
   5: 2 1
   6: 1 2
   7: 4
   8: 1 1 1
   9: 3 1
  10: 2 2
  11: 1 3
  12: 5
  13: 2 1 1
  14: 1 2 1
  15: 4 1
  16: 1 1 2
  17: 3 2
  18: 2 3
  19: 1 4
  20: 6
  21: 1 1 1 1
		

Crossrefs

In the following references, "before" is short for "before removing duplicate rows".
Positions of singleton rows appear to be A000071 = A000045-1, before A023758.
Positions of firsts appearances appear to be A001629.
Positions of rows of the form (1,1,...) appear to be A055588 = A001906+1.
First term of each row appears to be A083368.
Row sums appear to be A200648, before A000120.
Row lengths after the first row appear to be A200650+1, before A069010 = A037800+1.
Before the removals we had A245563 (except first term), see A245562, A246029, A328592.
For anti-run ranks we have A385816, before A348366, firsts A052499.
Standard composition numbers of rows are A385818, before A385889.
For anti-runs we have A385886, before A384877, firsts A384878.

Programs

  • Mathematica
    DeleteDuplicates[Table[Length/@Split[Join@@Position[Reverse[IntegerDigits[n,2]],1],#2==#1+1&],{n,0,100}]]

A277704 Positions of squares in A277699.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 8, 12, 14, 15, 16, 24, 28, 30, 31, 32, 48, 56, 60, 62, 63, 64, 83, 96, 112, 120, 124, 126, 127, 128, 166, 192, 224, 240, 248, 252, 254, 255, 256, 332, 365, 384, 448, 480, 496, 504, 508, 510, 511, 512, 664, 730, 768, 896, 960, 992, 1008, 1016, 1020, 1022, 1023, 1024, 1328, 1460, 1536, 1792, 1920, 1984, 2016
Offset: 1

Views

Author

Antti Karttunen, Nov 01 2016

Keywords

Crossrefs

Complement: A277706.
Cf. A023758 (a subsequence), A277807 (terms not in A023758).
Differs from A023758(1+n) and A077436(1+n) for the first time at n=23, for which a(23)=83, while A023758(24)=96 and A077436(24)=79.

A342126 The binary expansion of a(n) corresponds to that of n where all the 1's have been replaced by 0's except in the first run of 1's.

Original entry on oeis.org

0, 1, 2, 3, 4, 4, 6, 7, 8, 8, 8, 8, 12, 12, 14, 15, 16, 16, 16, 16, 16, 16, 16, 16, 24, 24, 24, 24, 28, 28, 30, 31, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 48, 48, 48, 48, 48, 48, 48, 48, 56, 56, 56, 56, 60, 60, 62, 63, 64, 64, 64, 64
Offset: 0

Views

Author

Rémy Sigrist, Apr 25 2021

Keywords

Comments

In other words, this sequence gives the first run of 1's in the binary expansion of a number.
A023758(n) appears A057728(n) times.

Examples

			The first terms, alongside their binary expansion, are:
  n   a(n)  bin(n)  bin(a(n))
  --  ----  ------  ---------
   0     0       0          0
   1     1       1          1
   2     2      10         10
   3     3      11         11
   4     4     100        100
   5     4     101        100
   6     6     110        110
   7     7     111        111
   8     8    1000       1000
   9     8    1001       1000
  10     8    1010       1000
  11     8    1011       1000
  12    12    1100       1100
  13    12    1101       1100
  14    14    1110       1110
  15    15    1111       1111
		

Crossrefs

Programs

  • PARI
    a(n) = { my (b=binary(n), p=1); for (k=1, #b, b[k] = p*=b[k]); fromdigits(b, 2) }
    
  • Python
    def A342126(n):
        s = bin(n)[2:]
        i = s.find('0')
        return n if i == -1 else (2**i-1)*2**(len(s)-i) # Chai Wah Wu, Apr 29 2021

Formula

a(n) = n - A087734(n).
a(2*n) = 2*a(n).
a(a(n)) = a(n).
a(n) <= n with equality iff n belongs to A023758.

A265397 a(n) = n - A264977(n).

Original entry on oeis.org

0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 8, 4, 0, 12, 0, 0, 0, 4, 8, 12, 16, 16, 8, 12, 0, 12, 24, 12, 0, 28, 0, 0, 0, 4, 8, 28, 16, 24, 24, 36, 32, 40, 32, 32, 16, 40, 24, 28, 0, 28, 24, 36, 48, 40, 24, 36, 0, 28, 56, 28, 0, 60, 0, 0, 0, 4, 8, 60, 16, 40, 56, 52, 32, 48, 48, 72, 48, 64, 72, 68, 64, 72, 80, 72, 64, 84, 64, 64, 32
Offset: 0

Views

Author

Antti Karttunen, Dec 16 2015

Keywords

Comments

Note that A264977(n) gives the value of the n-th Stern polynomial (cf. A260443, A125184) evaluated at X=2 over the field GF(2), while n gives the value of the same polynomial evaluated at X=2 in the usual way.
Each term seems to be a multiple of 4.

Crossrefs

Cf. A023758 (positions of zeros).

Programs

Formula

a(n) = n - A264977(n).

A277711 a(n) = position of the first occurrence of n in A264977.

Original entry on oeis.org

0, 1, 2, 3, 4, 9, 6, 7, 8, 81, 18, 23, 12, 17, 14, 15, 16, 153, 162, 47, 36, 49, 46, 87, 24, 73, 34, 159, 28, 33, 30, 31, 32, 177, 306, 95, 324, 97, 94, 303, 72, 137, 98, 111, 92, 297, 174, 175, 48, 145, 146, 135, 68, 1257, 318, 295, 56, 321, 66, 143, 60, 65, 62, 63, 64, 273, 354, 191, 612, 193, 190, 1119, 648, 265, 194, 1335, 188, 1233, 606
Offset: 0

Views

Author

Antti Karttunen, Oct 29 2016

Keywords

Crossrefs

Cf. A264977.
Leftmost column of A277710.
Fixed points: A023758.

Programs

  • Scheme
    (define (A277711 n) (let loop ((k 0)) (if (= (A264977 k) n) k (loop (+ 1 k))))) ;; Very crude.

A277899 a(n) = A097249(A260443(n)).

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 1, 2, 0, 1, 0, 0, 0, 3, 2, 3, 1, 3, 2, 2, 0, 2, 1, 2, 0, 1, 0, 0, 0, 4, 3, 4, 2, 4, 3, 3, 1, 3, 3, 3, 2, 3, 2, 2, 0, 3, 2, 3, 1, 3, 2, 2, 0, 2, 1, 2, 0, 1, 0, 0, 0, 5, 4, 5, 3, 5, 4, 4, 2, 4, 4, 4, 3, 4, 3, 4, 1, 4, 3, 4, 3, 4, 3, 4, 2, 4, 3, 4, 2, 3, 2, 2, 0, 4, 3, 4, 2, 4, 3, 3, 1, 3, 3, 3, 2, 3, 2, 3, 0, 3, 2, 3, 1, 3, 2, 2, 0
Offset: 0

Views

Author

Antti Karttunen, Nov 15 2016

Keywords

Comments

a(n) = number of times we must iterate A097246, starting at A260443(n), before the result is squarefree.

Crossrefs

Cf. A023758 (positions of zeros).

Programs

  • Scheme
    (define (A277899 n) (A097249_for_coeff_list (A260443as_coeff_list n)))
    (define (A097249_for_coeff_list nums) (let loop ((nums nums) (s 0)) (if (<= (reduce max 0 nums) 1) s (loop (A097246_for_coeff_list nums) (+ 1 s)))))
    (define (A097246_for_coeff_list nums) (add_two_lists (map A000035 nums) (cons 0 (map A004526 nums))))
    ;; For the other required functions, see A260443.

Formula

a(n) = A097249(A260443(n)).

A283983 Square root of the largest square dividing prime factorization representation of the n-th Stern polynomial: a(n) = A000188(A260443(n)).

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 1, 1, 1, 3, 5, 3, 1, 15, 1, 1, 1, 3, 5, 15, 7, 45, 5, 15, 1, 15, 35, 15, 1, 105, 1, 1, 1, 3, 5, 105, 7, 225, 35, 525, 11, 1575, 175, 1125, 7, 1575, 35, 105, 1, 105, 35, 525, 77, 1575, 35, 525, 1, 105, 385, 105, 1, 1155, 1, 1, 1, 3, 5, 1155, 7, 1575, 385, 3675, 11, 7875, 1225, 275625, 77, 55125, 2695, 5775, 13, 17325, 13475, 275625, 539
Offset: 0

Views

Author

Antti Karttunen, Mar 25 2017

Keywords

Crossrefs

Cf. A023758 (positions of ones).

Programs

Formula

a(n) = A000188(A260443(n)).
a(n) = A000196(A283989(n)).
Other identities. For all n >= 0:
a(2n) = A003961(a(n)).
A001222(a(n)) = A284264(n).

A284264 a(n) = A001222(A283983(n)).

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 2, 0, 0, 0, 1, 1, 2, 1, 3, 1, 2, 0, 2, 2, 2, 0, 3, 0, 0, 0, 1, 1, 3, 1, 4, 2, 4, 1, 5, 3, 5, 1, 5, 2, 3, 0, 3, 2, 4, 2, 5, 2, 4, 0, 3, 3, 3, 0, 4, 0, 0, 0, 1, 1, 4, 1, 5, 3, 5, 1, 6, 4, 8, 2, 7, 4, 5, 1, 6, 5, 8, 3, 10, 5, 7, 1, 7, 5, 8, 2, 7, 3, 4, 0, 4, 3, 6, 2, 8, 4, 7, 2, 8, 5, 9, 2, 8, 4, 5, 0, 5, 3, 6, 3, 7, 3, 6, 0
Offset: 0

Views

Author

Antti Karttunen, Mar 25 2017

Keywords

Comments

a(n) = Sum_{c} floor(c/2), where c ranges over each coefficient of terms c * x^k in the Stern polynomial B(n,x), thus sum of the halved terms (for odd terms floored down) on row n of table A125184.

Crossrefs

Cf. A023758 (gives the positions of zeros).

Programs

Formula

a(n) = A001222(A283983(n)).
Other identities and observations. For all n >= 0:
a(2n) = a(n).
a(n) = (1/2) * (A002487(n) - A277700(n)).
2*a(n) <= A284272(n).

A309761 Numbers that are sums of consecutive powers of 10.

Original entry on oeis.org

1, 10, 11, 100, 110, 111, 1000, 1100, 1110, 1111, 10000, 11000, 11100, 11110, 11111, 100000, 110000, 111000, 111100, 111110, 111111, 1000000, 1100000, 1110000, 1111000, 1111100, 1111110, 1111111, 10000000, 11000000, 11100000, 11110000, 11111000, 11111100
Offset: 1

Views

Author

Ilya Gutkovskiy, Aug 15 2019

Keywords

Comments

Numbers of the form (10^i - 10^j)/9 with i > j.

Examples

			11100 = 10^2 + 10^3 + 10^4, so 11100 is in the sequence.
		

Crossrefs

Programs

  • Maple
    seq(seq((10^i-10^(i-j))/9, j=1..i),i=1..10); # Robert Israel, Aug 16 2019
  • Python
    from math import isqrt
    def A309761(n): return (10**(m:=isqrt(n<<3)+1>>1)-10**(m*(m+1)-(n<<1)>>1))//9 # Chai Wah Wu, Apr 04 2025

Formula

a(n) = A007088(A023758(n+1)).
a(i*(i-1)/2 + j) = (10^i - 10^(i-j))/9 for 1<=j<=i. - Robert Israel, Aug 16 2019
a(n) = A276349(n)/10. - Chai Wah Wu, Jun 16 2025
Previous Showing 31-40 of 85 results. Next