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 11-20 of 30 results. Next

A328849 Numbers in whose primorial base expansion only even digits appear.

Original entry on oeis.org

0, 4, 12, 16, 24, 28, 60, 64, 72, 76, 84, 88, 120, 124, 132, 136, 144, 148, 180, 184, 192, 196, 204, 208, 420, 424, 432, 436, 444, 448, 480, 484, 492, 496, 504, 508, 540, 544, 552, 556, 564, 568, 600, 604, 612, 616, 624, 628, 840, 844, 852, 856, 864, 868, 900, 904, 912, 916, 924, 928, 960, 964, 972, 976, 984, 988, 1020, 1024
Offset: 1

Views

Author

Antti Karttunen, Oct 30 2019

Keywords

Comments

Numbers for which the prime factor form (A276086) of their primorial base expansion is a square, A000290.

Examples

			144 is written as "4400" in primorial base (A049345), because 4*A002110(3) + 4*A002110(2) + 0*A002110(1) + 0*A002110(0) = 4*30 + 4*6 = 144, thus all the digits are even and 144 is included in this sequence.
		

Crossrefs

Cf. A328834, A328850 (squares in this sequence).
Similar sequences: A005823 (ternary), A014263 (decimal), A062880 (quaternary), A351893 (factorial base).

Programs

  • Mathematica
    With[{max = 5}, bases = Prime@ Range[max, 1, -1]; nmax = Times @@ bases - 1; prmBaseDigits[n_] := IntegerDigits[n, MixedRadix[bases]]; Select[Range[0, nmax, 2], AllTrue[prmBaseDigits[#], EvenQ] &]] (* Amiram Eldar, May 23 2023 *)
  • PARI
    A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); };
    isA328849(n) = issquare(A276086(n));

Formula

a(n) = 2*A328770(n).
A000196(A276086(a(n))) = A276086(a(n)/2) = A328834(n).

A071992 a(n) = 3*n^2 + 2*n - 4 * Sum_{k=1..n} A003159(k).

Original entry on oeis.org

1, 0, 1, 4, 5, 4, 1, 0, 1, 0, 1, 4, 5, 8, 13, 16, 17, 16, 17, 20, 21, 20, 17, 16, 17, 16, 13, 8, 5, 4, 1, 0, 1, 0, 1, 4, 5, 4, 1, 0, 1, 0, 1, 4, 5, 8, 13, 16, 17, 16, 17, 20, 21, 24, 29, 32, 37, 44, 49, 52, 53, 56, 61, 64, 65, 64, 65, 68, 69, 68, 65, 64, 65, 64, 65, 68, 69, 72, 77, 80
Offset: 1

Views

Author

Benoit Cloitre, Jun 17 2002

Keywords

Comments

0 <= a(n) <= n for any n.

Crossrefs

Programs

Formula

For any k, a(A062880(k)) = 0.
a(A000695(k)) = A000695(k).

A062879 Integers whose Zeckendorf expansion does not contain ones at even positions.

Original entry on oeis.org

0, 2, 5, 7, 13, 15, 18, 20, 34, 36, 39, 41, 47, 49, 52, 54, 89, 91, 94, 96, 102, 104, 107, 109, 123, 125, 128, 130, 136, 138, 141, 143, 233, 235, 238, 240, 246, 248, 251, 253, 267, 269, 272, 274, 280, 282, 285, 287, 322, 324, 327, 329, 335, 337, 340, 342, 356
Offset: 1

Views

Author

Antti Karttunen, Jun 26 2001

Keywords

Crossrefs

Bisection of A062877.
Subset of A022342.

Programs

  • Mathematica
    fibOddCount[n_] := Plus @@ (Reverse@IntegerDigits[n, 2])[[1 ;; -1 ;; 2]]; oddIndexed = fibOddCount /@ Select[Range[0, 10000], BitAnd[#, 2 #] == 0 &]; -1 + Position[oddIndexed, ?(# == 0 &)] // Flatten (* _Amiram Eldar, Jan 20 2020  *)

Formula

A062880(n) = A003714(a(n)).
A165276(a(n)) = 0. - Amiram Eldar, Jan 20 2020

Extensions

Offset corrected by Amiram Eldar, Jan 20 2020

A351893 Numbers that contain only even digits in their factorial-base representation.

Original entry on oeis.org

0, 4, 12, 16, 48, 52, 60, 64, 96, 100, 108, 112, 240, 244, 252, 256, 288, 292, 300, 304, 336, 340, 348, 352, 480, 484, 492, 496, 528, 532, 540, 544, 576, 580, 588, 592, 1440, 1444, 1452, 1456, 1488, 1492, 1500, 1504, 1536, 1540, 1548, 1552, 1680, 1684, 1692, 1696
Offset: 1

Views

Author

Amiram Eldar, Feb 24 2022

Keywords

Comments

All the terms are multiples of 4 (A008586).

Examples

			4 is a term since its factorial-base presentation, 20, has only even digits.
16 is a term since its factorial-base presentation, 220, has only even digits.
		

Crossrefs

Subsequence: A052849 \ {2}.
Similar sequences: A005823 (ternary), A014263 (decimal), A062880 (quaternary).

Programs

  • Mathematica
    max = 7; fctBaseDigits[n_] := IntegerDigits[n, MixedRadix[Range[max, 2, -1]]]; Select[Range[0, max!, 2], AllTrue[fctBaseDigits[#], EvenQ] &]

A004468 a(n) = Nim product 3 * n.

Original entry on oeis.org

0, 3, 1, 2, 12, 15, 13, 14, 4, 7, 5, 6, 8, 11, 9, 10, 48, 51, 49, 50, 60, 63, 61, 62, 52, 55, 53, 54, 56, 59, 57, 58, 16, 19, 17, 18, 28, 31, 29, 30, 20, 23, 21, 22, 24, 27, 25, 26, 32, 35, 33, 34, 44, 47, 45, 46, 36, 39, 37, 38, 40, 43, 41, 42, 192, 195, 193, 194, 204, 207, 205
Offset: 0

Views

Author

Keywords

Comments

From Jianing Song, Aug 10 2022: (Start)
Write n in quaternary (base 4), then replace each 1,2,3 by 3,1,2.
This is a permutation of the natural numbers; A006015 is the inverse permutation (since the nim product of 2 and 3 is 1). (End)

References

  • J. H. Conway, On Numbers and Games. Academic Press, NY, 1976, pp. 51-53.

Crossrefs

Row 3 of array in A051775.

Programs

  • Maple
    read("transforms") ;
    # insert Maple procedures nimprodP2() and A051775() of the b-file in A051775 here.
    A004468 := proc(n)
            A051775(3,n) ;
    end proc:
    L := [seq(A004468(n),n=0..1000)] ; # R. J. Mathar, May 28 2011
    # second Maple program:
    a:= proc(n) option remember; `if`(n=0, 0,
          a(iquo(n, 4, 'r'))*4+[0, 3, 1, 2][r+1])
        end:
    seq(a(n), n=0..70);  # Alois P. Heinz, Jan 25 2022
  • Mathematica
    a[n_] := a[n] = If[n == 0, 0, {q, r} = QuotientRemainder[n, 4]; a[q]*4 + {0, 3, 1, 2}[[r + 1]]];
    Table[a[n], {n, 0, 70}] (* Jean-François Alcover, May 20 2022, after Alois P. Heinz *)
  • PARI
    a(n) = my(v=digits(n, 4), w=[0,3,1,2]); for(i=1, #v, v[i] = w[v[i]+1]); fromdigits(v, 4) \\ Jianing Song, Aug 10 2022
    
  • Python
    def a(n, D=[0, 3, 1, 2]):
        r, k = 0, 0
        while n>0: r+=D[n%4]*4**k; n//=4; k+=1
        return r
    # Onur Ozkan, Mar 07 2023

Formula

a(n) = A051775(3,n).
From Jianing Song, Aug 10 2022: (Start)
a(n) = 3*n if n has only digits 0 or 1 in quaternary (n is in A000695). Otherwise, a(n) < 3*n.
a(n) = n/2 if n has only digits 0 or 2 in quaternary (n is in A062880). Otherwise, a(n) > n/2.
a(n) = 2*n/3 if and only if n has only digits 0 or 3 in quaternary (n is in A001196). Proof: let n = Sum_i d_i*4^i, d(i) = 0,1,2,3. Write A = Sum_{d_i=1} 4^i, B = Sum_{d_i=2} 4^i, then a(n) = 2*n/3 if and only if 3*A + B = 2/3*(A + 2*B), or B = 7*A. If A != 0, then A is of the form (4*s+1)*4^t, but 7*A is not of this form. So the only possible case is A = B = 0, namely n has only digits 0 or 3. (End)

Extensions

More terms from Erich Friedman

A006015 Nim product 2*n.

Original entry on oeis.org

0, 2, 3, 1, 8, 10, 11, 9, 12, 14, 15, 13, 4, 6, 7, 5, 32, 34, 35, 33, 40, 42, 43, 41, 44, 46, 47, 45, 36, 38, 39, 37, 48, 50, 51, 49, 56, 58, 59, 57, 60, 62, 63, 61, 52, 54, 55, 53, 16, 18, 19, 17, 24, 26, 27, 25, 28, 30, 31, 29, 20, 22, 23, 21, 128, 130, 131, 129, 136, 138, 139
Offset: 0

Views

Author

Keywords

Comments

From Jianing Song, Aug 10 2022: (Start)
Write n in quaternary (base 4), then replace each 1,2,3 by 2,3,1.
This is a permutation of the natural numbers; A004468 is the inverse permutation (since the nim product of 2 and 3 is 1). (End)

References

  • J. H. Conway, On Numbers and Games. Academic Press, NY, 1976, pp. 51-53.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Row 2 of array in A051775.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 0,
          a(iquo(n, 4, 'r'))*4+[0, 2, 3, 1][r+1])
        end:
    seq(a(n), n=0..70);  # Alois P. Heinz, Jan 25 2022
  • Mathematica
    a[n_] := a[n] = If[n == 0, 0, {q, r} = QuotientRemainder[n, 4]; a[q]*4 + {0, 2, 3, 1}[[r + 1]]];
    Table[a[n], {n, 0, 70}] (* Jean-François Alcover, May 20 2022, after Alois P. Heinz *)
  • PARI
    a(n) = my(v=digits(n, 4), w=[0,2,3,1]); for(i=1, #v, v[i] = w[v[i]+1]); fromdigits(v, 4) \\ Jianing Song, Aug 10 2022
    
  • Python
    def a(n, D=[0, 2, 3, 1]):
        r, k = 0, 0
        while n>0: r+=D[n%4]*4**k; n//=4; k+=1
        return r
    # Onur Ozkan, Mar 07 2023

Formula

From Jianing Song, Aug 10 2022: (Start)
a(n) = A051775(2,n).
a(n) = 2*n if n has only digits 0 or 1 in quaternary (n is in A000695). Otherwise, a(n) < 2*n.
a(n) = n/3 if n has only digits 0 or 3 in quaternary (n is in A001196). Otherwise, a(n) > n/3.
a(n) = 3*n/2 if and only if n has only digits 0 or 2 in quaternary (n is in A062880). Proof: let n = Sum_i d_i*4^i, d(i) = 0,1,2,3. Write A = Sum_{d_i=1} 4^i, B = Sum_{d_i=3} 4^i, then a(n) = 3*n/2 if and only if 2*A + B = 3/2*(A + 3*B), or A = 7*B. If B != 0, then B is of the form (4*s+1)*4^t, but 7*B is not of this form. So the only possible case is A = B = 0, namely n has only digits 0 or 2. (End)

Extensions

More terms from Erich Friedman.

A054240 Bit-interleaved number addition table; like binary addition but carries shift 2 instead of 1; addition base sqrt(2).

Original entry on oeis.org

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

Views

Author

Marc LeBrun, Feb 07 2000

Keywords

Examples

			T(3,1)=6 because (0*2 + 1*sqrt(2) + 1*1) + (0*2 + 0*sqrt(2) + 1*1) = (1*2 + 1*sqrt(2) + 0*1) (i.e., base sqrt(2) addition).
		

Crossrefs

Cf. A000695, A054239, A057300, A062880, A352909 (pairs (i,j) such that A(i,j) = i+j).
Cf. A201651 (triangle read by rows).

Programs

  • Haskell
    import Data.Bits (xor, (.&.), shift)
    a054240 :: Integer -> Integer -> Integer
    a054240 x 0 = x
    a054240 x y = a054240 (x `xor` y) (shift (x .&. y) 2)
    a054240_adiag n =  map (\k -> a054240 (n - k) k) [0..n]
    a054240_square = map a054240_adiag [0..]
    -- Reinhard Zumkeller, Dec 03 2011

Formula

From Peter Munn, Dec 10 2019: (Start)
A(m,0) = A(0,m) = m.
A(n,k) = A(k,n).
A(n, A(m,k)) = A(A(n,m), k).
A(m,m) = 4*m.
A(2*n, 2*k) = 2*A(n,k).
A(A000695(n), A000695(k)) = A000695(n+k).
A(A000695(n), 2*A000695(k)) = A000695(n) + 2*A000695(k).
A(A000695(n) + 2*A000695(m), k) = A(A000695(n), k) + A(2*A000695(m), k) - k.
A(A057300(n), A057300(k)) = A057300(A(n,k)).
(End)

A269707 Decimal expansion of x = 3*Sum_{n in E} 1/10^n where E is the set of numbers whose base-4 representation consists of only 0's and 1's.

Original entry on oeis.org

3, 3, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 3, 3, 0
Offset: 1

Views

Author

Michel Lagneau, Mar 10 2016

Keywords

Comments

E = {0, 1, 4, 5, 16, 17, 20, 21, 64, ...} (A000695).
Among the real numbers it is exceptional for the decimal expansion of a real number to determine the decimal expansion of its reciprocal. The purpose of this sequence is to show an example of such a number.
x is irrational. Proof: For all n >= 1, the numbers 3*4^n, 3*4^n + 1, 3*4^n + 2, ..., 3*4^n + 4^(n - 1) each contain at least one base-4 digit different from 0 or 1. So, the decimal expansion of x contains sequences of consecutive zeros with an arbitrary length. Moreover, the decimal expansion also contains an infinite number of digits 3, which implies that x is not periodic, so irrational.
We obtain the following property: 1/x = 3*Sum_{n in 2*E} 1/10^(n + 1) where 2*E = {0, 2, 8, 10, 32, 34, 40, 42, ...} (A062880).

Examples

			x = 3.3003300000000003300330000000000000000000000000000...
1/x = 0.303000003030000000000000000000003030000030300000...
		

References

  • Daniel Duverney, Number Theory, World Scientific, 2010, 2.10 A striking number, pp. 19-20.

Crossrefs

Programs

  • Maple
    Digits:=200:nn:=5000:s:=0:
    for n from 0 to nn do:
      x:=convert(n,base,4):n0:=nops(x):
      it:=0:ii:=0:
        for k from 1 to n0 while(ii=0) do:
         if x[k]=0 or x[k]=1
          then
          it:=it+1:
         else
        fi:
    od:
    if it=n0 then
    s:= s+evalf(1/10^n):
    else ii:=1:fi:
    od:
    print(3*s):
    print(1/(3*s)):
  • Mathematica
    a[n_] := 3 * Boole[Max @ IntegerDigits[n-1, 4] <= 1]; Array[a, 100] (* Amiram Eldar, Aug 06 2021 *)

Extensions

Edited by Rick L. Shepherd, May 31 2016

A360613 Lexicographically earliest sequence of positive integers such that the products of the form a(2*u-1) * a(2*v) with u, v > 0 are all distinct.

Original entry on oeis.org

1, 1, 2, 3, 4, 5, 7, 8, 9, 11, 13, 15, 14, 17, 18, 19, 23, 24, 25, 29, 26, 31, 28, 33, 36, 37, 41, 40, 43, 47, 46, 49, 50, 51, 52, 53, 59, 55, 61, 57, 63, 64, 67, 71, 73, 79, 81, 83, 82, 85, 86, 87, 88, 89, 91, 93, 92, 95, 97, 101, 100, 103, 107, 109, 113, 111
Offset: 1

Views

Author

Rémy Sigrist, Feb 14 2023

Keywords

Comments

In other words, the products of a term from the odd bisection by a term from the even bisection are all distinct.
If we consider the bitwise XOR operator instead of the multiplication then we obtain A000695 interleaved with A062880.
The value 1 is the only duplicate.
All prime numbers appear in this sequence, in ascending order.
For n = 1..50000, if m_n denotes the least positive value not in {a(2*u-1) * a(2*v), 1 <= 2*u-1 <= n and 1 <= 2*v <= n}, then a(n+1) = m_n or a(n+2) = m_n. Will this pattern last forever?

Examples

			The first terms, alongside the corresponding products, are:
  n   a(n)  Corresponding products
  --  ----  --------------------------
   1     1
   2     1   1
   3     2   2
   4     3   3,  6
   5     4   4, 12
   6     5   5, 10, 20
   7     7   7, 21, 35
   8     8   8, 16, 32,  56
   9     9   9, 27, 45,  72
  10    11  11, 22, 44,  77,  99
  11    13  13, 39, 65, 104, 143
  12    15  15, 30, 60, 105, 135, 195
		

Crossrefs

Cf. A000695, A062880, A066724, A360627-A360628 (bisections), A360633 (products).

Programs

  • C
    See Links section.

Formula

a(n) < a(n+2).

A033053 Numbers whose base-2 representation Sum_{i=0..m} d(i)*2^i has d(i)=1 when i != m mod 2.

Original entry on oeis.org

1, 3, 6, 7, 13, 15, 26, 27, 30, 31, 53, 55, 61, 63, 106, 107, 110, 111, 122, 123, 126, 127, 213, 215, 221, 223, 245, 247, 253, 255, 426, 427, 430, 431, 442, 443, 446, 447, 490, 491, 494, 495, 506, 507, 510, 511, 853, 855, 861, 863
Offset: 1

Views

Author

Keywords

Comments

Numbers 2^(2k)-1 - A062880(m) where 2^(2k-2) >= A062880(m) or 2^(2k+1)-1 - A000695(m) where 2^(2k-1) >= A000695(m). - Franklin T. Adams-Watters, Aug 30 2014

Examples

			26 = 11010_2 has m=4, and d(i) = 1 for i=1 and 3.
53 = 110101_2 has m=5, and d(i) = 1 for i=0, 2 and 4.
		

Crossrefs

Disjoint with A032937 if more than 1 digit.

Programs

  • Maple
    F:= proc(m)
       local n0,j,S;
       n0:= 2^m + add(2^(m-1-2*j),j=0..floor((m-1)/2));
       S:= combinat[powerset]({seq(2^(m-2*j),j=1..floor(m/2))});
       map(t -> convert(t,`+`)+n0,S);
    end;
    `union`(seq(F(m),m=0..24)}; # Robert Israel, Mar 30 2014

Formula

a(2j+2) = 4 a(j)+3,
a(2j+1) = 4 a(j) + 2 if j <= 3*2^(m-1)-2,
a(2j+1) = 4 a(j) + 1 otherwise, where m = floor(log_2(j+1)).

Extensions

Definition corrected, incorrect cross-reference removed, and recurrence formulas by Robert Israel, Mar 30 2014
Previous Showing 11-20 of 30 results. Next