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

A268670 a(n) = A006068(A268669(n)).

Original entry on oeis.org

1, 3, 1, 7, 1, 3, 5, 15, 5, 3, 13, 7, 9, 11, 1, 31, 1, 11, 29, 7, 25, 27, 9, 15, 17, 19, 5, 23, 13, 3, 21, 63, 21, 3, 61, 23, 57, 59, 13, 15, 49, 51, 17, 55, 5, 19, 53, 31, 33, 35, 1, 39, 29, 11, 37, 47, 9, 27, 45, 7, 41, 43, 25, 127, 25, 43, 125, 7, 121, 123, 41, 47, 113, 115, 9, 119, 45, 27, 117, 31, 97, 99, 33, 103, 1
Offset: 1

Views

Author

Antti Karttunen, Feb 10 2016

Keywords

Comments

All terms are odd, by definition.

Crossrefs

Cf. A001317 (positions of ones).

Programs

Formula

a(n) = A006068(A268669(n)).

A276579 Squarefree numbers larger than one for which A268669(A048675(n)) is a power of two.

Original entry on oeis.org

2, 3, 5, 6, 7, 10, 11, 13, 15, 17, 19, 21, 22, 23, 29, 31, 35, 37, 39, 41, 43, 46, 47, 53, 55, 59, 61, 67, 71, 73, 77, 79, 83, 85, 87, 89, 91, 97, 101, 103, 107, 109, 113, 118, 127, 131, 133, 137, 139, 143, 149, 151, 155, 157, 163, 167, 173, 179, 181, 183, 187, 191, 193, 197, 199, 210, 211, 221, 223, 227, 229, 233
Offset: 1

Views

Author

Antti Karttunen, Sep 18 2016

Keywords

Comments

Terms present in arrays A255483 & A276578, sorted into ascending order.

Crossrefs

Cf. array A255483 (A276578).
Subsequence of A005117.
A000040 is a subsequence.

A001317 Sierpiński's triangle (Pascal's triangle mod 2) converted to decimal.

Original entry on oeis.org

1, 3, 5, 15, 17, 51, 85, 255, 257, 771, 1285, 3855, 4369, 13107, 21845, 65535, 65537, 196611, 327685, 983055, 1114129, 3342387, 5570645, 16711935, 16843009, 50529027, 84215045, 252645135, 286331153, 858993459, 1431655765, 4294967295, 4294967297, 12884901891, 21474836485, 64424509455, 73014444049, 219043332147, 365072220245, 1095216660735, 1103806595329, 3311419785987
Offset: 0

Views

Author

Keywords

Comments

The members are all palindromic in binary, i.e., a subset of A006995. - Ralf Stephan, Sep 28 2004
J. H. Conway writes (in Math Forum): at least the first 31 numbers give odd-sided constructible polygons. See also A047999. - M. Dauchez (mdzzdm(AT)yahoo.fr), Sep 19 2005 [This observation was also made in 1982 by N. L. White (see letter). - N. J. A. Sloane, Jun 15 2015]
Decimal number generated by the binary bits of the n-th generation of the Rule 60 elementary cellular automaton. Thus: 1; 0, 1, 1; 0, 0, 1, 0, 1; 0, 0, 0, 1, 1, 1, 1; 0, 0, 0, 0, 1, 0, 0, 0, 1; ... . - Eric W. Weisstein, Apr 08 2006
Limit_{n->oo} log(a(n))/n = log(2). - Bret Mulvey, May 17 2008
Equals row sums of triangle A166548; e.g., 17 = (2 + 4 + 6 + 4 + 1). - Gary W. Adamson, Oct 16 2009
Equals row sums of triangle A166555. - Gary W. Adamson, Oct 17 2009
For n >= 1, all terms are in A001969. - Vladimir Shevelev, Oct 25 2010
Let n,m >= 0 be such that no carries occur when adding them. Then a(n+m) = a(n)*a(m). - Vladimir Shevelev, Nov 28 2010
Let phi_a(n) be the number of a(k) <= a(n) and respectively prime to a(n) (i.e., totient function over {a(n)}). Then, for n >= 1, phi_a(n) = 2^v(n), where v(n) is the number of 0's in the binary representation of n. - Vladimir Shevelev, Nov 29 2010
Trisection of this sequence gives rows of A008287 mod 2 converted to decimal. See also A177897, A177960. - Vladimir Shevelev, Jan 02 2011
Converting the rows of the powers of the k-nomial (k = 2^e where e >= 1) term-wise to binary and reading the concatenation as binary number gives every (k-1)st term of this sequence. Similarly with powers p^k of any prime. It might be interesting to study how this fails for powers of composites. - Joerg Arndt, Jan 07 2011
This sequence appears in Pascal's triangle mod 2 in another way, too. If we write it as
1111111...
10101010...
11001100...
10001000...
we get (taking the period part in each row):
.(1) (base 2) = 1
.(10) = 2/3
.(1100) = 12/15 = 4/5
.(1000) = 8/15
The k-th row, treated as a binary fraction, seems to be equal to 2^k / a(k). - Katarzyna Matylla, Mar 12 2011
From Daniel Forgues, Jun 16-18 2011: (Start)
Since there are 5 known Fermat primes, there are 32 products of distinct Fermat primes (thus there are 31 constructible odd-sided polygons, since a polygon has at least 3 sides). a(0)=1 (empty product) and a(1) to a(31) are those 31 non-products of distinct Fermat primes.
It can be proved by induction that all terms of this sequence are products of distinct Fermat numbers (A000215):
a(0)=1 (empty product) are products of distinct Fermat numbers in { };
a(2^n+k) = a(k) * (2^(2^n)+1) = a(k) * F_n, n >= 0, 0 <= k <= 2^n - 1.
Thus for n >= 1, 0 <= k <= 2^n - 1, and
a(k) = Product_{i=0..n-1} F_i^(alpha_i), alpha_i in {0, 1},
this implies
a(2^n+k) = Product_{i=0..n-1} F_i^(alpha_i) * F_n, alpha_i in {0, 1}.
(Cf. OEIS Wiki links below.) (End)
The bits in the binary expansion of a(n) give the coefficients of the n-th power of polynomial (X+1) in ring GF(2)[X]. E.g., 3 ("11" in binary) stands for (X+1)^1, 5 ("101" in binary) stands for (X+1)^2 = (X^2 + 1), and so on. - Antti Karttunen, Feb 10 2016

Examples

			Given a(5)=51, a(6)=85 since a(5) XOR 2*a(5) = 51 XOR 102 = 85.
From _Daniel Forgues_, Jun 18 2011: (Start)
  a(0) = 1 (empty product);
  a(1) = 3 = 1 * F_0 = a(2^0+0) = a(0) * F_0;
  a(2) = 5 = 1 * F_1 = a(2^1+0) = a(0) * F_1;
  a(3) = 15 = 3 * 5 = F_0 * F_1 = a(2^1+1) = a(1) * F_1;
  a(4) = 17 = 1 * F_2 = a(2^2+0) = a(0) * F_2;
  a(5) = 51 = 3 * 17 = F_0 * F_2 = a(2^2+1) = a(1) * F_2;
  a(6) = 85 = 5 * 17 = F_1 * F_2 = a(2^2+2) = a(2) * F_2;
  a(7) = 255 = 3 * 5 * 17 = F_0 * F_1 * F_2 = a(2^2+3) = a(3) * F_2;
  ... (End)
		

References

  • Jean-Paul Allouche and Jeffrey Shallit, Automatic sequences, Cambridge University Press, 2003, p. 113.
  • Henry Wadsworth Gould, Exponential Binomial Coefficient Series, Tech. Rep. 4, Math. Dept., West Virginia Univ., Morgantown, WV, Sept. 1961.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 136-137.

Crossrefs

Cf. A038183 (odd bisection, 1D Cellular Automata Rule 90).
Iterates of A048724 (starting from 1).
Row 3 of A048723.
Positions of records in A268389.
Positions of ones in A268669 and A268384 (characteristic function).
Not the same as A045544 nor as A053576.
Cf. A045544.

Programs

  • Haskell
    a001317 = foldr (\u v-> 2*v + u) 0 . map toInteger . a047999_row
    -- Reinhard Zumkeller, Nov 24 2012
    (Scheme, with memoization-macro definec, two variants)
    (definec (A001317 n) (if (zero? n) 1 (A048724 (A001317 (- n 1)))))
    (definec (A001317 n) (if (zero? n) 1 (A048720bi 3 (A001317 (- n 1))))) ;; Where A048720bi implements the dyadic function given in A048720.
    ;; Antti Karttunen, Feb 10 2016
    
  • Magma
    [&+[(Binomial(n, i) mod 2)*2^i: i in [0..n]]: n in [0..41]]; // Vincenzo Librandi, Feb 12 2016
    
  • Maple
    A001317 := proc(n) local k; add((binomial(n,k) mod 2)*2^k, k=0..n); end;
  • Mathematica
    a[n_] := Nest[ BitXor[#, BitShiftLeft[#, 1]] &, 1, n]; Array[a, 42, 0] (* Joel Madigan (dochoncho(AT)gmail.com), Dec 03 2007 *)
    NestList[BitXor[#,2#]&,1,50] (* Harvey P. Dale, Aug 02 2021 *)
  • PARI
    a(n)=sum(i=0,n,(binomial(n,i)%2)*2^i)
    
  • PARI
    a=1; for(n=0, 66, print1(a,", "); a=bitxor(a,a<<1) ); \\ Joerg Arndt, Mar 27 2013
    
  • PARI
    A001317(n,a=1)={for(k=1,n,a=bitxor(a,a<<1));a} \\ M. F. Hasler, Jun 06 2016
    
  • PARI
    a(n) = subst(lift(Mod(1+'x,2)^n), 'x, 2); \\ Gheorghe Coserea, Nov 09 2017
    
  • Python
    from sympy import binomial
    def a(n): return sum([(binomial(n, i)%2)*2**i for i in range(n + 1)]) # Indranil Ghosh, Apr 11 2017
    
  • Python
    def A001317(n): return int(''.join(str(int(not(~n&k))) for k in range(n+1)),2) # Chai Wah Wu, Feb 04 2022

Formula

a(n+1) = a(n) XOR 2*a(n), where XOR is binary exclusive OR operator. - Paul D. Hanna, Apr 27 2003
a(n) = Product_{e(j, n) = 1} (2^(2^j) + 1), where e(j, n) is the j-th least significant digit in the binary representation of n (Roberts: see Allouche & Shallit). - Benoit Cloitre, Jun 08 2004
a(2*n+1) = 3*a(2*n). Proof: Since a(n) = Product_{k in K} (1 + 2^(2^k)), where K is the set of integers such that n = Sum_{k in K} 2^k, clearly K(2*n+1) = K(2*n) union {0}, hence a(2*n+1) = (1+2^(2^0))*a(2*n) = 3*a(2*n). - Emmanuel Ferrand and Ralf Stephan, Sep 28 2004
a(32*n) = 3 ^ (32 * n * log(2) / log(3)) + 1. - Bret Mulvey, May 17 2008
For n >= 1, A000120(a(n)) = 2^A000120(n). - Vladimir Shevelev, Oct 25 2010
a(2^n) = A000215(n); a(2^n-1) = a(2^n)-2; for n >= 1, m >= 0,
a(2^(n-1)-1)*a(2^n*m + 2^(n-1)) = 3*a(2^(n-1))*a(2^n*m + 2^(n-1)-2). - Vladimir Shevelev, Nov 28 2010
Sum_{k>=0} 1/a(k) = Product_{n>=0} (1 + 1/F_n), where F_n=A000215(n);
Sum_{k>=0} (-1)^(m(k))/a(k) = 1/2, where {m(n)} is Thue-Morse sequence (A010060).
If F_n is defined by F_n(z) = z^(2^n) + 1 and a(n) by (1/2)*Sum_{i>=0}(1-(-1)^{binomial(n,i)})*z^i, then, for z > 1, the latter two identities hold as well with the replacement 1/2 in the right hand side of the 2nd one by 1-1/z. - Vladimir Shevelev, Nov 29 2010
G.f.: Product_{k>=0} ( 1 + z^(2^k) + (2*z)^(2^k) ). - conjectured by Shamil Shakirov, proved by Vladimir Shevelev
a(n) = A000225(n+1) - A219843(n). - Reinhard Zumkeller, Nov 30 2012
From Antti Karttunen, Feb 10 2016: (Start)
a(0) = 1, and for n > 1, a(n) = A048720(3, a(n-1)) = A048724(a(n-1)).
a(n) = A048723(3,n).
a(n) = A193231(A000079(n)).
For all n >= 0: A268389(a(n)) = n.
(End)

A268389 a(n) = greatest k such that polynomial (X+1)^k divides the polynomial (in polynomial ring GF(2)[X]) that is encoded in the binary expansion of n. (See the comments for details).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Feb 10 2016

Keywords

Comments

a(n) gives the number of iterations of map k -> A006068(k)/2 that are required (when starting from k = n) until k is an odd number.
A001317 gives the record positions and particularly, A001317(n) gives the first occurrence of n in this sequence.
When polynomials over GF(2) are encoded in the binary representation of n in a natural way where each polynomial b(n)*X^n+...+b(0)*X^0 over GF(2) is represented by the binary number b(n)*2^n+...+b(0)*2^0 in N (each coefficient b(k) is either 0 or 1), then a(n) = the number of times polynomial X+1 (encoded by 3, "11" in binary) divides the polynomial encoded by n.

Examples

			For n = 5 ("101" in binary) which encodes polynomial x^2 + 1, we see that it can be factored over GF(2) as (X+1)(X+1), and thus a(5) = 2.
For n = 8 ("1000" in binary) which encodes polynomial x^3, we see that it is not divisible in ring GF(2)[X] by polynomial X+1, thus a(8) = 0.
For n = 9 ("1001" in binary) which encodes polynomial x^3 + 1, we see that it can be factored over GF(2) as (X+1)(X^2 + X + 1), and thus a(9) = 1.
		

Crossrefs

Cf. A268669 (quotient left after (X+1)^a(n) has been divided out).
Cf. A268395 (partial sums).
Cf. A000069 (positions of zeros), A268679 (this sequence without zeros).
Cf. also A037096, A037097, A136386.

Programs

  • Mathematica
    f[n_] := Which[n == 1, 0, OddQ@ #, 0, EvenQ@ #, 1 + f[#/2]] &@ Fold[BitXor, n, Quotient[n, 2^Range[BitLength@ n - 1]]]; Array[f, {120}] (* Michael De Vlieger, Feb 12 2016, after Jan Mangaldan at A006068 *)
  • PARI
    a(n) = {my(b = binary(n), p = Pol(binary(n))*Mod(1,2), k = poldegree(p)); while (type(p/(x+1)^k*Mod(1,2)) != "t_POL", k--); k;} \\ Michel Marcus, Feb 12 2016
    
  • Scheme
    ;; This employs the given recurrence and uses memoization-macro definec:
    (definec (A268389 n) (if (odd? (A006068 n)) 0 (+ 1 (A268389 (/ (A006068 n) 2)))))
    (define (A268389 n) (let loop ((n n) (s 0)) (let ((k (A006068 n))) (if (odd? k) s (loop (/ k 2) (+ 1 s)))))) ;; Computed in a loop, no memoization.

Formula

If A006068(n) is odd, then a(n) = 0, otherwise a(n) = 1 + a(A006068(n)/2).
Other identities. For all n >= 0:
a(A001317(n)) = n. [The sequence works as a left inverse of A001317.]
A048720(A268669(n),A048723(3,a(n))) = A048720(A268669(n),A001317(a(n))) = n.
A048724^a(n) (A268669(n)) = n. [The a(n)-th fold application (power) of A048724 when applied to A268669(n) gives n back.]
a(n) = A007949(A235042(n)).
a(A057889(n)) = a(n).

A280500 Square array for division in ring GF(2)[X]: A(r,c) = r/c, or 0 if c is not a divisor of r, where the binary expansion of each number defines the corresponding (0,1)-polynomial.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jan 09 2017

Keywords

Comments

The array A(row,col) is read by descending antidiagonals: A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.

Examples

			The top left 17 X 17 corner of the array:
col: 1  2   3  4  5  6  7  8  9 10 11 12 13 14 15 16 17
     --------------------------------------------------
     1, 0,  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
     2, 1,  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
     3, 0,  1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
     4, 2,  0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
     5, 0,  3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
     6, 3,  2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
     7, 0,  0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
     8, 4,  0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0
     9, 0,  7, 0, 0, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0
    10, 5,  6, 0, 2, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0
    11, 0,  0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0
    12, 6,  4, 3, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0
    13, 0,  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0
    14, 7,  0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0
    15, 0,  5, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0
    16, 8,  0, 4, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0
    17, 0, 15, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 1
    ---------------------------------------------------
7 ("111" in binary) encodes polynomial X^2 + X + 1, which is irreducible over GF(2) (7 is in A014580), thus it is divisible only by itself and 1, and for any other values of c than 1 and 7, A(7,c) = 0.
9 ("1001" in binary) encodes polynomial X^3 + 1, which is factored over GF(2) as (X+1)(X^2 + X + 1), and thus A(9,3) = 7 and A(9,7) = 3 because the polynomial X + 1 is encoded by 3 ("11" in binary).
		

Crossrefs

Cf. A280499 for the lower triangular region (A280494 for its transpose).

Programs

  • PARI
    up_to = 10440;
    A280500sq(a,b) = { my(Pa=Pol(binary(a))*Mod(1, 2), Pb=Pol(binary(b))*Mod(1, 2)); if(0!=lift(Pa % Pb), 0, fromdigits(Vec(lift(Pa/Pb)),2)); };
    A280500list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, i++; if(i > up_to, return(v)); v[i] = A280500sq(col,(a-(col-1))))); (v); };
    v280500 = A280500list(up_to);
    A280500(n) = v280500[n]; \\ Antti Karttunen, Jan 05 2025
    
  • Scheme
    (define (A280500 n) (A280500bi (A002260 n) (A004736 n)))
    ;; A very naive implementation:
    (define (A280500bi row col) (let loop ((d row)) (cond ((zero? d) d) ((= (A048720bi d col) row) d) (else (loop (- d 1)))))) ;; A048720bi implements the carryless binary multiplication A048720.

Formula

A(row,col) = the unique d such that A048720(d,col) = row, provided that such d exists, otherwise zero.
Other identities. For all n >= 1:
A(n, A001317(A268389(n))) = A268669(n).

A268671 a(n) = (A268670(n)+1) / 2.

Original entry on oeis.org

1, 2, 1, 4, 1, 2, 3, 8, 3, 2, 7, 4, 5, 6, 1, 16, 1, 6, 15, 4, 13, 14, 5, 8, 9, 10, 3, 12, 7, 2, 11, 32, 11, 2, 31, 12, 29, 30, 7, 8, 25, 26, 9, 28, 3, 10, 27, 16, 17, 18, 1, 20, 15, 6, 19, 24, 5, 14, 23, 4, 21, 22, 13, 64, 13, 22, 63, 4, 61, 62, 21, 24, 57, 58, 5, 60, 23, 14, 59, 16, 49, 50, 17, 52, 1
Offset: 1

Views

Author

Antti Karttunen, Feb 10 2016

Keywords

Crossrefs

Cf. A001317 (positions of ones).

Programs

  • Mathematica
    f[n_] := Fold[BitXor, n, Quotient[n, 2^Range[BitLength@ n - 1]]]; g[n_] := If[OddQ@ #, n, g[#/2]] &@ f[n]; Table[(f@ g@ n + 1)/2, {n, 85}]  (* Michael De Vlieger, Feb 12 2016, after Jan Mangaldan at A006068 *)
  • Scheme
    (define (A268671 n) (/ (+ 1 (A268670 n)) 2))

Formula

a(n) = (A268670(n)+1) / 2.

A269165 If A269162(n) = 0, then a(n) = n, otherwise a(n) = a(A269162(n)).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 1, 8, 9, 10, 11, 12, 3, 2, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 1, 6, 5, 4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 15, 2, 3, 12, 11, 10, 55, 8, 57, 58, 59, 60, 61, 62, 9, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81
Offset: 0

Views

Author

Antti Karttunen, Feb 21 2016

Keywords

Comments

a(n) is the earliest finite ancestor pattern n in Rule-30 or n itself if n has no finite predecessors.
Starting from k = a(n) with any n and iterating map k -> A269160(k) exactly A269166(n) times yields n back.
Apart from zero no terms of A269163 occur so all terms after zero are in A269164. Each term of A269164 occurs an infinitely many times.

Crossrefs

Cf. A269160, A269163, A269164, A269166 (for a distance in A269162-steps to the ancestor pattern).
Cf. A110240 (indices of ones in this sequence).
Cf. also A268669.

Programs

  • Scheme
    ;; This implementation is based on given recurrence and utilitizes the memoization-macro definec:
    (definec (A269165 n) (let ((p (A269162 n))) (if (zero? p) n (A269165 p))))
    ;; This one computes the same with tail-recursive iteration:
    (define (A269165 n) (let loop ((n n) (p (A269162 n))) (if (zero? p) n (loop p (A269162 p)))))

Formula

If A269162(n) = 0, then a(n) = n, otherwise a(n) = a(A269162(n)).

A277812 a(n) = the first odious number encountered when starting from k = n and iterating the map k -> A003188(A006068(k)/2).

Original entry on oeis.org

1, 2, 1, 4, 2, 1, 7, 8, 4, 2, 11, 1, 13, 14, 7, 16, 8, 4, 19, 2, 21, 22, 11, 1, 25, 26, 13, 28, 14, 7, 31, 32, 16, 8, 35, 4, 37, 38, 19, 2, 41, 42, 21, 44, 22, 11, 47, 1, 49, 50, 25, 52, 26, 13, 55, 56, 28, 14, 59, 7, 61, 62, 31, 64, 32, 16, 67, 8, 69, 70, 35, 4, 73, 74, 37, 76, 38, 19, 79, 2, 81, 82, 41, 84, 42, 21, 87, 88, 44, 22, 91, 11, 93, 94, 47, 1, 97, 98, 49, 100
Offset: 1

Views

Author

Antti Karttunen, Nov 03 2016

Keywords

Crossrefs

Cf. A277808 (gives the number of such iterations needed to reach a(n) from n).
Cf. A003945 (the positions of 1's in this sequence).

Formula

If A010060(n) = 1 [when n is one of the odious numbers, A000069], then a(n) = n, otherwise a(n) = a(A003188(A006068(n)/2)).
Other identities:
a(n) = A000069(A277813(n)).
If A010060(n) = 0 [when n is one of the evil numbers, A001969], then a(n)= a(A000265(n)) [the trailing zeros in binary expansion of n do not affect the result].
For all n >= 1, a(A000069(n)) = A000069(n). [By definition].
For all n > 1, a(A001969(n)) < A001969(n).
Showing 1-8 of 8 results.