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 21-30 of 34 results. Next

A168081 Lucas sequence U_n(x,1) over the field GF(2)[x].

Original entry on oeis.org

0, 1, 2, 5, 8, 21, 34, 81, 128, 337, 546, 1301, 2056, 5381, 8706, 20737, 32768, 86273, 139778, 333061, 526344, 1377557, 2228770, 5308753, 8388736, 22085713, 35782690, 85262357, 134742024, 352649221, 570556418, 1359020033, 2147483648, 5653987329, 9160491010
Offset: 0

Views

Author

Max Alekseyev, Nov 18 2009

Keywords

Comments

The Lucas sequence U_n(x,1) over the field GF(2)={0,1} is: 0, 1, x, x^2+1, x^3, x^4+x^2+1, x^5+x, ... Numerical values are obtained evaluating these 01-polynomials at x=2 over the integers.
The counterpart sequence is V_n(x,1) = x*U_n(x,1) that implies identities like U_{2n}(x,1) = x*U_n(x,1)^2. - Max Alekseyev, Nov 19 2009
Also, Chebyshev polynomials of the second kind evaluated at x=1/2 (A049310) with the resulting coefficients taken modulo 2, and then evaluated at x=2. - Max Alekseyev, Jun 20 2025

Crossrefs

A bisection of A006921. Cf. A260022. - N. J. A. Sloane, Jul 14 2015
See also A257971, first differences of A006921. - Reinhard Zumkeller, Jul 14 2015

Programs

  • Maple
    a:= proc(n) option remember;
          `if`(n<2, n, Bits[Xor](2*a(n-1), a(n-2)))
        end:
    seq(a(n), n=0..35);  # Alois P. Heinz, Jun 16 2025
  • Mathematica
    a[0] = 0; a[1] = 1; a[n_] := a[n] = BitXor[2 a[n - 1], a[n - 2]]; Table[a@ n, {n, 0, 32}] (* Michael De Vlieger, Dec 11 2015 *)
  • PARI
    { a=0; b=1; for(n=1,50, c=bitxor(2*b,a); a=b; b=c; print1(c,", "); ); }
    
  • PARI
    { a168081(n) = subst(lift(polchebyshev(n-1,2,x/2)*Mod(1,2)),x,2); } \\ Max Alekseyev, Jun 20 2025
  • Python
    def A168081(n): return sum(int(not r & ~(2*n-1-r))*2**(n-1-r) for r in range(n)) # Chai Wah Wu, Jun 20 2022
    

Formula

For n>1, a(n) = (2*a(n-1)) XOR a(n-2).
a(n) = A248663(A206296(n)). - Antti Karttunen, Dec 11 2015
A000120(a(n)) = A002487(n). - Karl-Heinz Hofmann, Jun 16 2025
a(n) = Sum_{k=0..n} (A049310(n,k) mod 2) * 2^k. - Max Alekseyev, Jun 20 2025

A090882 Suppose n=(p1^e1)(p2^e2)... where p1,p2,... are the prime numbers and e1,e2,... are nonnegative integers. Then a(n) = e1 + (e2)*5 + (e3)*25 + (e4)*125 + ... + (ek)*(5^(k-1)) + ...

Original entry on oeis.org

0, 1, 5, 2, 25, 6, 125, 3, 10, 26, 625, 7, 3125, 126, 30, 4, 15625, 11, 78125, 27, 130, 626, 390625, 8, 50, 3126, 15, 127, 1953125, 31, 9765625, 5, 630, 15626, 150, 12, 48828125, 78126, 3130, 28, 244140625, 131, 1220703125, 627, 35, 390626, 6103515625, 9, 250
Offset: 1

Views

Author

Sam Alexander, Dec 12 2003

Keywords

Comments

Replace "5" with "x" and extend the definition of a to positive rationals and a becomes an isomorphism between positive rationals under multiplication and polynomials over Z under addition. This remark generalizes A001222, A048675 and A054841: evaluate said polynomial at x=1, x=2 and x=10, respectively.

References

  • Joseph J. Rotman, The Theory of Groups: An Introduction, 2nd ed. Boston: Allyn and Bacon, Inc. 1973. Page 9, problem 1.26.

Crossrefs

Programs

  • PARI
    A090882(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*5^(primepi(f[k, 1])-1)); }; \\ Antti Karttunen, Apr 28 2022

Extensions

More terms from Ray Chandler, Dec 20 2003

A297108 If n is prime(k)^e, e >= 1, then a(n) = 2^(k-1), otherwise 0; Möbius transform of A048675.

Original entry on oeis.org

0, 1, 2, 1, 4, 0, 8, 1, 2, 0, 16, 0, 32, 0, 0, 1, 64, 0, 128, 0, 0, 0, 256, 0, 4, 0, 2, 0, 512, 0, 1024, 1, 0, 0, 0, 0, 2048, 0, 0, 0, 4096, 0, 8192, 0, 0, 0, 16384, 0, 8, 0, 0, 0, 32768, 0, 0, 0, 0, 0, 65536, 0, 131072, 0, 0, 1, 0, 0, 262144, 0, 0, 0, 524288, 0, 1048576, 0, 0, 0, 0, 0, 2097152, 0, 2, 0, 4194304
Offset: 1

Views

Author

Antti Karttunen, Dec 25 2017

Keywords

Comments

This is also Xor-Moebius transform of A248663, in other words, the unique sequence satisfying SumXOR_{d divides n} a(d) = A248663(n) for all n > 0, where SumXOR is the analog of summation under the binary XOR operation. See A295901 for a list of some of the properties of this transform.

Crossrefs

Programs

  • PARI
    A297108(n) = if(1==omega(n),2^(primepi(factor(n)[1,1])-1),0);
    \\ A more complicated way which demonstrates the Moebius transform:
    A048675(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; }; \\ This function after Michel Marcus
    A297108(n) = sumdiv(n,d,moebius(n/d)*A048675(d));
    \\ And yet another way demonstrating the comment:
    A248663(n) = A048675(core(n));
    A297108(n) = { my(v=0); fordiv(n, d, if(issquarefree(n/d), v=bitxor(v, A248663(d)))); (v); } \\ after code in A295901.

Formula

If A001221(n) = 1 [when n is in A000961], then a(n) = 2^(A297109(n)-1) = 2^(A055396(n)-1), otherwise 0.
a(n) = Sum_{d|n} A048675(d)*A008683(n/d).

A227320 Binary XOR of proper divisors of n.

Original entry on oeis.org

0, 1, 1, 3, 1, 0, 1, 7, 2, 6, 1, 2, 1, 4, 7, 15, 1, 15, 1, 8, 5, 8, 1, 6, 4, 14, 11, 14, 1, 6, 1, 31, 9, 18, 3, 21, 1, 16, 15, 20, 1, 26, 1, 26, 1, 20, 1, 14, 6, 21, 19, 16, 1, 6, 15, 26, 17, 30, 1, 4, 1, 28, 25, 63, 9, 58, 1, 52, 21, 38, 1, 33, 1, 38, 17, 50, 13, 54, 1
Offset: 1

Views

Author

Alex Ratushnyak, Jul 06 2013

Keywords

Comments

An alternative definition (with A027751) would define a(1)=1. - R. J. Mathar, Jul 14 2013
However, this definition is more aligned with A001065 and A218403 where the initial term a(1) is also 0. - Antti Karttunen, Oct 08 2017

Crossrefs

Programs

  • Mathematica
    Array[BitXor @@ Most@ Divisors@ # &, 79] (* Michael De Vlieger, Oct 08 2017 *)
  • PARI
    A227320(n) = { my(s=0); fordiv(n,d,if(dAntti Karttunen, Oct 08 2017

Formula

a(n) = A178910(n) XOR n, where XOR is the binary logical exclusive or operator.
From Antti Karttunen, Oct 08 2017: (Start)
a(n) = A248663(A293214(n)).
a(n) <= A218403(n) <= A001065(n).
(End)

A275808 a(0) = 0, for n >= 1, a(n) = A275736(n) XOR a(A257684(n)), where XOR is given by A003987.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 09 2016

Keywords

Crossrefs

Cf. A275809 (positions of zeros), A275810 (and their first differences).
Cf. also A275728.

Formula

a(0) = 0, for n >= 1, a(n) = A275736(n) XOR a(A257684(n)), where 2-argument function XOR is given by A003987.
a(n) = A248663(A275734(n)).

A285101 a(0) = 2, for n > 0, a(n) = a(n-1)*A242378(n,a(n-1)), where A242378(n,a(n-1)) shifts the prime factorization of a(n-1) n primes towards larger primes with A003961.

Original entry on oeis.org

2, 6, 210, 3573570, 64845819350301990, 28695662573739152697846686144187168109530, 1038300112150956151877699324649731518883355380534272386781875587619359740733888844803014212990
Offset: 0

Views

Author

Antti Karttunen, Apr 15 2017

Keywords

Comments

Multiplicative encoding of irregular table A053632 (in style of A007188 and A260443).

Crossrefs

Programs

  • PARI
    A003961(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
    A242378(k,n) = { while(k>0,n = A003961(n); k = k-1); n; };
    A285101(n) = { if(0==n,2,A285101(n-1)*A242378(n,A285101(n-1))); };
    
  • Python
    from sympy import factorint, prime, primepi
    from operator import mul
    from functools import reduce
    def a003961(n):
        f=factorint(n)
        return 1 if n==1 else reduce(mul, [prime(primepi(i) + 1)**f[i] for i in f])
    def a242378(k, n):
        while k>0:
            n=a003961(n)
            k-=1
        return n
    l=[2]
    for n in range(1, 7):
        x=l[n - 1]
        l.append(x*a242378(n, x))
    print(l) # Indranil Ghosh, Jun 27 2017
  • Scheme
    (definec (A285101 n) (if (zero? n) 2 (* (A285101 (- n 1)) (A242378bi n (A285101 (- n 1)))))) ;; For A242378bi see A242378.
    

Formula

a(0) = 2, for n > 0, a(n) = a(n-1)*A242378(n,a(n-1)).
Other identities. For all n >= 0:
A001222(a(n)) = A000079(n).
A048675(a(n)) = A028362(1+n).
A248663(a(n)) = A068052(n).
A007913(a(n)) = A285102(n).

A265408 Prime factorization representation of Spironacci polynomials: a(0) = 1, a(1) = 2, and for n > 1, a(n) = A003961(a(n-1)) * a(A265409(n)).

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 13, 17, 38, 138, 870, 9765, 213675, 4309305, 201226025, 9679967297, 810726926009, 40855897091009, 4259653632223561, 380804291082185737, 44319264099050115071, 4644246052673250585913
Offset: 0

Views

Author

Antti Karttunen, Dec 13 2015

Keywords

Comments

The polynomials encoded by these numbers could also be called "Fernandez spiral polynomials" after Neil Fernandez, who discovered sequence A078510, which is obtained when they are evaluated at X=1.
The polynomial recurrence uses the same composition rules as the Fibonacci polynomials (A206296), but with the neighborhood rules of A078510, where the other polynomial is taken from the nearest inner neighbor (A265409) when the polynomials are arranged as a spiral into a square grid. See A265409 for the illustration.

Examples

			n    a(n)   prime factorization    Spironacci polynomial
------------------------------------------------------------
0       1   (empty)                S_0(x) = 0
1       2   p_1                    S_1(x) = 1
2       3   p_2                    S_2(x) = x
3       5   p_3                    S_3(x) = x^2
4       7   p_4                    S_4(x) = x^3
5      11   p_5                    S_5(x) = x^4
6      13   p_6                    S_6(x) = x^5
7      17   p_7                    S_7(x) = x^6
8      38   p_8 * p_1              S_8(x) = x^7 + 1
9     138   p_9 * p_2 * p_1        S_9(x) = x^8 + x + 1
		

Crossrefs

Formula

a(0) = 1, a(1) = 2, and for n >= 2, a(n) = A003961(a(n-1)) * a(A265409(n)).
Other identities. For all n >= 0:
A078510(n) = A001222(a(n)). [when each polynomial is evaluated at x=1]
A265407(n) = A248663(a(n)). [at x=2 over the field GF(2)]

A336321 a(n) = A122111(A225546(n)).

Original entry on oeis.org

1, 2, 3, 4, 7, 5, 19, 6, 9, 11, 53, 10, 131, 23, 13, 8, 311, 15, 719, 22, 29, 59, 1619, 14, 49, 137, 21, 46, 3671, 17, 8161, 12, 61, 313, 37, 25, 17863, 727, 139, 26, 38873, 31, 84017, 118, 39, 1621, 180503, 20, 361, 77, 317, 274, 386093, 33, 71, 58, 733, 3673, 821641, 34, 1742537, 8167, 87, 18, 151, 67, 3681131, 626, 1627, 41, 7754077, 35, 16290047
Offset: 1

Views

Author

Antti Karttunen and Peter Munn, Jul 17 2020

Keywords

Comments

A122111 and A225546 are both self-inverse permutations of the positive integers based on prime factorizations, and they share further common properties. For instance, they map the prime numbers to powers of 2: A122111 maps the k-th prime to 2^k, whereas A225546 maps it to 2^2^(k-1).
In composing these permutations, this sequence maps the squarefree numbers, as listed in A019565, to the prime numbers in increasing order; and the list of powers of 2 to the "normal" numbers (A055932), as listed in A057335.

Examples

			From _Peter Munn_, Jan 04 2021: (Start)
In this set of examples we consider [a(n)] as a function a(.) with an inverse, a^-1(.).
First, a table showing mapping of the powers of 2:
  n     a^-1(2^n) =    2^n =        a(2^n) =
        A001146(n-1)   A000079(n)   A057335(n)
  0             (1)         1            1
  1               2         2            2
  2               4         4            4
  3              16         8            6
  4             256        16            8
  5           65536        32           12
  6      4294967296        64           18
  ...
Next, a table showing mapping of the squarefree numbers, as listed in A019565 (a lexicographic ordering by prime factors):
  n   a^-1(A019565(n))   A019565(n)      a(A019565(n))   a^2(A019565(n))
      Cf. {A337533}      Cf. {A005117}   = prime(n)      = A033844(n-1)
  0              1               1             (1)               (1)
  1              2               2               2                 2
  2              3               3               3                 3
  3              8               6               5                 7
  4              6               5               7                19
  5             12              10              11                53
  6             18              15              13               131
  7            128              30              17               311
  8              5               7              19               719
  9             24              14              23              1619
  ...
As sets, the above columns are A337533, A005117, A008578, {1} U A033844.
Similarly, we get bijections between sets A000290\{0} -> {1} U A070003; and {1} U A335740 -> A005408 -> A066207.
(End)
		

Crossrefs

A122111 composed with A225546.
Cf. A336322 (inverse permutation).
Other sequences used in a definition of this sequence: A000040, A000188, A019565, A248663, A253550, A253560.
Sequences used to express relationship between terms of this sequence: A003159, A003961, A297002, A334747.
Cf. A057335.
A mapping between the binary tree sequences A334866 and A253563.
Lists of sets (S_1, S_2, ... S_j) related by the bijection defined by the sequence: (A000290\{0}, {1} U A070003), ({1} U A001146, A000079, A055932), ({1} U A335740, A005408, A066207), (A337533, A005117, A008578, {1} U A033844).

Formula

a(n) = A122111(A225546(n)).
Alternative definition: (Start)
Write n = m^2 * A019565(j), where m = A000188(n), j = A248663(n).
a(1) = 1; otherwise for m = 1, a(n) = A000040(j), for m > 1, a(n) = A253550^j(A253560(a(m))).
(End)
a(A000040(m)) = A033844(m-1).
a(A001146(m)) = 2^(m+1).
a(2^n) = A057335(n).
a(n^2) = A253560(a(n)).
For n in A003159, a(2n) = b(a(n)), where b(1) = 2, b(n) = A253550(n), n >= 2.
More generally, a(A334747(n)) = b(a(n)).
a(A003961(n)) = A297002(a(n)).
a(A334866(m)) = A253563(m).

A265407 Spironacci-style recurrence: a(0)=0, a(1)=1, a(n) = 2*a(n) XOR a(A265409(n)).

Original entry on oeis.org

0, 1, 2, 4, 8, 16, 32, 64, 129, 259, 519, 1036, 2074, 4150, 8296, 16600, 33208, 66424, 132832, 265696, 531424, 1062880, 2125696, 4251521, 8502785, 17005825, 34011905, 68023301, 136047622, 272093206, 544188470, 1088378998, 2176753882, 4353515996, 8707015520, 17414063992, 34828160840, 69656354600, 139312643368
Offset: 0

Views

Author

Antti Karttunen, Dec 13 2015

Keywords

Comments

Spironacci-polynomials evaluated at X=2 over the field GF(2).
This is otherwise computed like A078510, which starts with a(0)=0 placed in the center of spiral (in square grid), followed by a(1) = 1, after which each term is a sum of two previous terms that are nearest when terms are arranged in a spiral, that is terms a(n-1) and a(A265409(n)), except here we first multiply the term a(n-1) by 2, and use carryless XOR (A003987) instead of normal addition.

Crossrefs

Formula

a(0)=0, a(1)=1; after which, a(n) = 2*a(n) XOR a(A265409(n)).
a(n) = A248663(A265408(n)).

A324337 a(n) = A002487(A006068(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Feb 23 2019

Keywords

Comments

Like in A324338, a few terms preceding each position n = 2^k seem to be a batch of nearby Fibonacci numbers in some order.
For all n > 0 A324338(n)/A324337(n) constitutes an enumeration system of all positive rationals. For all n > 0 A324338(n) + A324337(n) = A071585(n). - Yosu Yurramendi, Oct 22 2019

Crossrefs

Programs

Formula

From Yosu Yurramendi, Oct 22 2019: (Start)
a(2^m+ k) = A324338(2^m+2^(m-1)+k), m > 0, 0 <= k < 2^(m-1)
a(2^m+2^(m-1)+k) = A324338(2^m+ k), m > 0, 0 <= k < 2^(m-1). (End)
a(n) = A324338(A063946(n)), n > 0. Yosu Yurramendi, Nov 04 2019
a(n) = A002487(A248663(A283477(n))). - Antti Karttunen, Nov 06 2019
a(n) = A002487(1+A233279(n)). - Yosu Yurramendi, Nov 08 2019
From Yosu Yurramendi, Nov 28 2019: (Start)
a(2^(m+1)+k) - a(2^m+k) = A324338(k), m >= 0, 0 <= k < 2^m.
a(A059893(2^(m+1)+A001969(k+1))) - a(A059893(2^m+A001969(k+1))) = A071585(k), m >= 0, 0 <= k < 2^(m-1).
a(A059893(2^(m+1)+ A000069(k+1))) = A071585(k), m >= 1, 0 <= k < 2^(m-1). (End)
From Yosu Yurramendi, Nov 29 2019: (Start)
For n > 0:
A324338(n) + A324337(n) = A071585(n).
A324338(2*A001969(n) )-A324337(2*A001969(n) ) = A071585(n-1)
A324338(2*A001969(n)+1)-A324337(2*A001969(n)+1) = -A324337(n-1)
A324338(2*A000069(n) )-A324337(2*A000069(n) ) = -A071585(n-1)
A324338(2*A000069(n)+1)-A324337(2*A000069(n)+1) = A324338(n-1) (End)
a(n) = A002487(1+A233279(n)). - Yosu Yurramendi, Dec 27 2019
Previous Showing 21-30 of 34 results. Next