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-10 of 16 results. Next

A329115 a(n) = floor(A026549(n)/5).

Original entry on oeis.org

0, 0, 1, 2, 7, 14, 43, 86, 259, 518, 1555, 3110, 9331, 18662, 55987, 111974, 335923, 671846, 2015539, 4031078, 12093235, 24186470, 72559411, 145118822, 435356467, 870712934, 2612138803, 5224277606, 15672832819, 31345665638, 94036996915, 188073993830
Offset: 1

Views

Author

Clark Kimberling, Nov 10 2019

Keywords

Crossrefs

Programs

  • Mathematica
    s[1] = 1; s[n_] := If[IntegerQ[n/2], 2*s[n - 1], 3*s[n - 1]]
    Table[s[n], {n, 1, 20}] (* A026532 *)
    Table[Floor[s[n]/5], {n, 1, 50}] (* A329115 *)

Formula

a(n+1) = 2*a(n) if n is odd, a(n+1) = 3*a(n)+1 if n is even.
a(n) = f(2^f(n/2) * 3^f((n-1)/2) / 5), where f = floor.
G.f.: (x^2 (1 + 2 x))/((-1 + x) (1 + x) (-1 + 6 x^2)).
a(n) = 7*a(n-2) - 6*a(n-4).

A010693 Periodic sequence: Repeat 2,3.

Original entry on oeis.org

2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3
Offset: 0

Views

Author

Keywords

Comments

a(n) = smallest prime divisor of n!! for n >= 2. For biggest prime divisor of n!! see A139421. - Artur Jasinski, Apr 21 2008
Let A be the Hessenberg matrix of order n, defined by: A[1,j]=1, A[i,i]:=-3, A[i,i-1]=-1, and A[i,j]=0 otherwise. Then, for n>=1, a(n)=-charpoly(A,-2). - Milan Janjic, Jan 27 2010
Simple continued fraction of 1+sqrt(5/3) = A176020. - R. J. Mathar, Mar 08 2012
p(n) = a(n-1) is the Abelian complexity function of the Thue-Morse word A010060. - Nathan Fox, Mar 12 2013

Crossrefs

Cf. A139421.
Cf. A026549 (partial products).

Programs

Formula

a(n) = 5/2 - ((-1)^n)/2.
a(n) = 2 + (n mod 2) = A007395(n) + A000035(n). - Reinhard Zumkeller, Mar 23 2005
a(n) = A020639(A016767(n)) for n>0. - Reinhard Zumkeller, Jan 29 2009
From Jaume Oliver Lafont, Mar 20 2009: (Start)
G.f.: (2+3*x)/(1-x^2).
Linear recurrence: a(0)=2, a(1)=3, a(n)=a(n-2) for n>=2. (End)
a(n) = A001615(2n)/A001615(n) for n > 0. - Enrique Pérez Herrero, Jun 06 2012
a(n) = floor((n+1)*5/2) - floor((n)*5/2). - Hailey R. Olafson, Jul 23 2014
a(n) = 3 - ((n+1) mod 2). - Wesley Ivan Hurt, Jul 24 2014
E.g.f.: 2*cosh(x) + 3*sinh(x). - Stefano Spezia, Aug 04 2025

Extensions

Definition rewritten by Bruno Berselli, Sep 30 2011

A026536 Irregular triangular array T read by rows: T(i,0 ) = T(i,2i) = 1 for i >= 0; T(i,1) = T(i,2i-1) = floor(i/2) for i >= 1; for even n >= 2, T(i,j) = T(i-1,j-2) + T(i-1,j-1) + T(i-1,j) for j = 2..2i-2, for odd n >= 3, T(i,j) = T(i-1,j-2) + T(i-1,j) for j = 2..2i-2.

Original entry on oeis.org

1, 1, 0, 1, 1, 1, 2, 1, 1, 1, 1, 3, 2, 3, 1, 1, 1, 2, 5, 6, 8, 6, 5, 2, 1, 1, 2, 6, 8, 13, 12, 13, 8, 6, 2, 1, 1, 3, 9, 16, 27, 33, 38, 33, 27, 16, 9, 3, 1, 1, 3, 10, 19, 36, 49, 65, 66, 65, 49, 36, 19, 10, 3, 1, 1, 4, 14, 32, 65, 104, 150, 180, 196, 180
Offset: 0

Views

Author

Keywords

Comments

T(n, k) is the number of strings s(0)..s(n) such that s(0) = 0, s(n) = n-k, |s(i) - s(i-1)| <= 1 if i is even, |s(i) - s(i-1)| = 1 if i is odd.

Examples

			First 5 rows:
  1
  1  0  1
  1  1  2  1  1
  1  1  3  2  3  1  1
  1  2  5  6  8  6  5  2  1
		

Crossrefs

Programs

  • Mathematica
    z = 12; t[n_, 0] := 1; t[n_, k_] := 1 /; k == 2 n; t[n_, 1] := Floor[n/2];
    t[n_, k_] := Floor[n/2] /; k == 2 n - 1; t[n_, k_] := t[n, k] =
    If[EvenQ[n], t[n - 1, k - 2] + t[n - 1, k - 1] + t[n - 1, k], t[n - 1, k -
    2] + t[n - 1, k]]; u = Table[t[n, k], {n, 0, z}, {k, 0, 2 n}];
    TableForm[u]   (* A026536 array *)
    v = Flatten[u] (* A026536 sequence *)
  • SageMath
    @cached_function
    def T(n, k):
        if k < 0 or n < 0: return 0
        elif k == 0 or k == 2*n: return 1
        elif k == 1 or k == 2*n-1: return n//2
        elif n % 2 == 1: return T(n-1, k-2) + T(n-1, k)
        return T(n-1, k-2) + T(n-1, k-1) + T(n-1, k) # Peter Luschny, Oct 13 2019

Extensions

Updated by Clark Kimberling, Aug 28 2014
Offset changed to 0 by Peter Luschny, Oct 10 2019

A026532 Ratios of successive terms are 3, 2, 3, 2, 3, 2, 3, 2, ...

Original entry on oeis.org

1, 3, 6, 18, 36, 108, 216, 648, 1296, 3888, 7776, 23328, 46656, 139968, 279936, 839808, 1679616, 5038848, 10077696, 30233088, 60466176, 181398528, 362797056, 1088391168, 2176782336, 6530347008, 13060694016, 39182082048, 78364164096, 235092492288, 470184984576
Offset: 1

Views

Author

Keywords

Comments

Preface the series with a 1: (1, 1, 3, 6, 18, 36, ...); then the next term in the series = (1, 1, 3, 6, ...) dot (1, 2, 1, 2, ...). Example: 36 = (1, 1, 3, 6, 18) dot (1, 2, 1, 2, 1) = (1 + 2 + 3 + 12 + 18). - Gary W. Adamson, Apr 18 2009
Partial products of A176059. - Reinhard Zumkeller, Apr 04 2012

Crossrefs

Cf. A038730, A038792, and A134511 for incomplete Fibonacci sequences, and A324242 for incomplete Lucas sequences.

Programs

  • Haskell
    a026532 n = a026532_list !! (n-1)
    a026532_list = scanl (*) 1 $ a176059_list
    -- Reinhard Zumkeller, Apr 04 2012
    
  • Magma
    [(1/4)*(3-(-1)^n)*6^Floor(n/2) : n in [1..30]]; // Vincenzo Librandi, Jun 08 2011
    
  • Mathematica
    FoldList[(2 + Boole[EvenQ@ #2]) #1 &, Range@ 28] (* or *)
    CoefficientList[Series[x*(1+3x)/(1-6x^2), {x,0,31}], x] (* Michael De Vlieger, Aug 02 2017 *)
    LinearRecurrence[{0,6},{1,3},30] (* Harvey P. Dale, Jul 11 2018 *)
  • PARI
    a(n)=if(n%2,3,1)*6^(n\2) \\ Charles R Greathouse IV, Jul 02 2013
    
  • Python
    def a(n): return (3 if n%2 else 1)*6**(n//2)
    print([a(n) for n in range(31)]) # Indranil Ghosh, Aug 02 2017
    
  • Sage
    [(1/2)*6^((n-2)/2)*(3*(1+(-1)^n) + sqrt(6)*(1-(-1)^n)) for n in (1..30)] # G. C. Greubel, Dec 21 2021

Formula

a(n) = T(n, 0) + T(n, 1) + ... + T(n, 2n-2), T given by A026519.
From Benoit Cloitre, Nov 14 2003: (Start)
a(n) = (1/2)*(5+(-1)^n)*a(n-1) for n>1, a(1) = 1.
a(n) = (1/4)*(3-(-1)^n)*6^floor(n/2). (End)
From Ralf Stephan, Feb 03 2004: (Start)
G.f.: x*(1+3*x)/(1-6*x^2).
a(n+2) = 6*a(n). (End)
a(n+3) = a(n+2)*a(n+1)/a(n). - Reinhard Zumkeller, Mar 04 2011
a(n) = (1/2)*6^((n-2)/2)*(3*(1+(-1)^n) + sqrt(6)*(1-(-1)^n)). - G. C. Greubel, Dec 21 2021
Sum_{n>=1} 1/a(n) = 8/5. - Amiram Eldar, Feb 13 2023

Extensions

New definition from Ralf Stephan, Dec 01 2004
Offset changed from 0 to 1 by Vincenzo Librandi, Jun 08 2011

A373957 Greatest number of runs in a permutation of the prime factors of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 06 2024

Keywords

Comments

If n belongs to A335433 (the separable case), then a(n) = A001222(n). A multiset is separable iff it has a permutation that is an anti-run (meaning there are no adjacent equal parts).

Examples

			The prime factors of 24 are {2,2,2,3}, with permutations (2,2,2,3), (2,2,3,2), (2,3,2,2), (3,2,2,2), with runs:
  ((2,2,2),(3))
  ((2,2),(3),(2))
  ((2),(3),(2,2))
  ((3),(2,2,2))
with lengths (2,3,3,2), with maximum a(24) = 3.
		

Crossrefs

The minimum instead of maximum is A001221.
Positions of 2 are A006881.
Positions of first appearances appear to be A026549.
Positions of 1 are A246655.
The variation A374246 is the difference from bigomega (A001222).
The variation A374247 is the difference with omega (A001221).
This is the last position of a positive term in row n of A374252.
A001221 counts distinct prime factors, A001222 with multiplicity.
A008480 counts permutations of prime factors.
A056239 adds up prime indices, row sums of A112798.
A124767 counts runs in standard compositions, anti-runs A333381.
A304038 is run-compression of prime indices, sums A066328, factors A027748.
A333755 counts compositions by number of runs.
A335433 lists numbers whose prime factors are separable, complement A335448.

Programs

  • Mathematica
    prifacs[n_]:=If[n==1,{},Flatten[ConstantArray@@@FactorInteger[n]]];
    Table[Max@@Table[Length[Split[y]],{y,Permutations[prifacs[n]]}],{n,100}]

Formula

a(n) = A374247(n) - A001221(n).
a(n) = A001222(n) - A374246(n).

A374252 Irregular triangle read by rows where T(n,k) is the number of permutations of the prime factors of n with k runs.

Original entry on oeis.org

1, 1, 1, 0, 1, 0, 2, 1, 1, 0, 0, 1, 0, 0, 2, 1, 0, 2, 1, 1, 0, 2, 0, 2, 1, 0, 0, 0, 1, 0, 2, 1, 1, 0, 2, 1, 0, 2, 0, 2, 1, 0, 2, 2, 0, 1, 0, 0, 2, 1, 0, 0, 0, 2, 1, 1, 0, 0, 6, 1, 1, 0, 0, 0, 0, 0, 2, 0, 2, 0, 2, 0, 2, 2, 2, 1, 0, 2, 0, 2, 0, 2, 2, 0, 1
Offset: 2

Views

Author

Gus Wiseman, Jul 07 2024

Keywords

Comments

An alternative form of this sequence (with the same data) has offset 1 and begins with an empty row.
Note that the prime factors of n are separable (A335433) iff the last term of row n is positive.

Examples

			The T(36,3) = 2 permutations are (2,3,3,2) and (3,2,2,3).
Row n = 72 counts the following permutations:
  .  (2,2,2,3,3)  (2,2,3,3,2)  (2,2,3,2,3)  (2,3,2,3,2)
     (3,3,2,2,2)  (2,3,3,2,2)  (2,3,2,2,3)
                  (3,2,2,2,3)  (3,2,2,3,2)
                               (3,2,3,2,2)
Triangle begins:
   1:
   2: 1
   3: 1
   4: 1  0
   5: 1
   6: 0  2
   7: 1
   8: 1  0  0
   9: 1  0
  10: 0  2
  11: 1
  12: 0  2  1
  13: 1
  14: 0  2
  15: 0  2
  16: 1  0  0  0
  17: 1
  18: 0  2  1
  19: 1
  20: 0  2  1
		

Crossrefs

Row-lengths are A001222.
Row-sums are A008480 (number of permutations of prime factors).
Column k = 1 is A069513.
For compositions instead of permutations of prime factors we have A238130.
Last column is A335452 (where k = A001222(n)), which counts separations.
Position of the last positive term in row n is A373957(n).
The number of zeros at the end of row n is A374246(n).
The number of nonzero terms in row n is A374247(n).
A001221 counts distinct prime factors.
A003242 counts run-compressed compositions, i.e., anti-runs.
A124767 counts runs in standard compositions, anti-runs A333381.
A333755 counts compositions by number of runs.
A335433 lists separable numbers, complement A335448.
A374250 maximizes sum of run-compression, for indices A373956.

Programs

  • Mathematica
    prifacs[n_]:=If[n==1,{},Flatten[ConstantArray@@@FactorInteger[n]]];
    Table[Length[Select[Permutations[prifacs[n]], Length[Split[#]]==k&]],{n,100},{k,PrimeOmega[n]}]

A374246 Number of prime factors of n counted with multiplicity (A001222) minus the greatest number of runs possible in a permutation of them (A373957).

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 07 2024

Keywords

Comments

a(n) = 0 iff n has separable prime factors (A335433). A multiset is separable iff it has a permutation that is an anti-run (meaning there are no adjacent equal parts).

Examples

			The runs of the 4 permutations of the prime factors of 24 are:
  ((2,2,2),(3))
  ((2,2),(3),(2))
  ((2),(3),(2,2))
  ((3),(2,2,2))
The longest have length 3, so a(24) = 4 - 3 = 1.
		

Crossrefs

Using the minimum instead of maximum number of runs gives A046660.
Positions of first appearances are A151821 (powers of 2 except 2 itself).
Positions of positive terms are A335448, complement A335433.
This is an opposite version of A373957.
The sister-sequence A374247 uses A001221 instead of A001222.
This is the number of zeros at the end of row n of A374252.
A001221 counts distinct prime factors, A001222 with multiplicity.
A008480 counts permutations of prime factors.
A027746 lists prime factors, row-sums A001414.
A027748 is run-compression of prime factors, row-sums A008472.
A304038 is run-compression of prime indices, row-sums A066328.
A374250 maximizes sum of run-compression, for indices A373956.

Programs

  • Mathematica
    prifacs[n_]:=If[n==1,{}, Flatten[ConstantArray@@@FactorInteger[n]]];
    Table[PrimeOmega[n]-Max@@Table[Length[Split[y]], {y,Permutations[prifacs[n]]}],{n,100}]

Formula

a(n) = A001222(n) - A373957(n).

A374247 The greatest number of runs possible in a permutation of the prime factors of n (A373957) minus the number of distinct such factors (A001221).

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 07 2024

Keywords

Comments

If n has separable prime factors (A335433), then a(n) = A001222(n) - A001221(n) = A046660(n). A multiset is separable iff it has an anti-run permutation (meaning there are no adjacent equal parts).

Examples

			The runs of the 6 permutations of the prime factors of 36 are:
  ((2,2),(3,3))
  ((2),(3),(2),(3))
  ((2),(3,3),(2))
  ((3),(2,2),(3))
  ((3),(2),(3),(2))
  ((3,3),(2,2))
The longest length is 4, so a(36) = 4 - 2 = 2.
		

Crossrefs

Positions of first appearances appear to be A026549.
Positions of nonzero terms are A126706, complement A303554.
This is an opposite version of A373957.
The sister-sequence A374246 uses A001222 instead of A001221.
This is the number of nonzero terms in row n of A374252.
A003242 counts run-compressed compositions, i.e., anti-runs.
A008480 counts permutations of prime factors, by number of runs A374252.
A027746 lists prime factors, row-sums A001414.
A027748 is run-compression of prime factors, row-sums A008472.
A304038 is run-compression of prime indices, row-sums A066328.
A333755 counts compositions by number of runs.
A335433 lists separable numbers, complement A335448.
A374250 maximizes sum of run-compression, for indices A373956.

Programs

  • Mathematica
    prifacs[n_]:=If[n==1,{},Flatten[ConstantArray@@@FactorInteger[n]]];
    Table[Max@@Table[Length[Split[y]], {y,Permutations[prifacs[n]]}]-PrimeNu[n],{n,100}]

Formula

a(n) = A373957(n) - A001221(n).

A374248 Sum of prime indices of n (with multiplicity) minus the greatest possible sum of run-compression of a permutation of the prime indices of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 10 2024

Keywords

Comments

We define the run-compression of a sequence to be the anti-run obtained by reducing each run of repeated parts to a single part. Alternatively, run-compression removes all parts equal to the part immediately to their left. For example, (1,1,2,2,1) has run-compression (1,2,1).
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The prime indices of 96 are {1,1,1,1,1,2}, with sum 7, and we have permutations such as (1,1,1,1,2,1), with run-compression (1,2,1), with sum 4, so a(96) = 7 - 4 = 3.
		

Crossrefs

Positions of zeros are A335433 (separable).
Positions of positive terms are A335448 (inseparable).
This is an opposite version of A373956, for prime factors A374250.
For prime factors instead of indices we have A374255.
A001221 counts distinct prime factors, A001222 with multiplicity.
A003242 counts run-compressed compositions, i.e., anti-runs.
A007947 (squarefree kernel) represents run-compression of multisets.
A008480 counts permutations of prime factors.
A027746 lists prime factors, row-sums A001414.
A027748 is run-compression of prime factors, row-sums A008472.
A056239 adds up prime indices, row-sums of A112798.
A116861 counts partitions by sum of run-compression.
A304038 is run-compression of prime indices, row-sums A066328.
A373949 counts compositions by sum of run-compression, opposite A373951.
A373957 gives greatest number of runs in a permutation of prime factors.
A374251 run-compresses standard compositions, sum A373953, rank A373948.
A374252 counts permutations of prime factors by number of runs.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Total[prix[n]]-Max@@(Total[First/@Split[#]]&/@Permutations[prix[n]]),{n,100}]

Formula

a(n) = A056239(n) - A373956(n).

A109827 Numbers written in an alternating binary-then-ternary base.

Original entry on oeis.org

0, 1, 10, 11, 20, 21, 100, 101, 110, 111, 120, 121, 1000, 1001, 1010, 1011, 1020, 1021, 1100, 1101, 1110, 1111, 1120, 1121, 2000, 2001, 2010, 2011, 2020, 2021, 2100, 2101, 2110, 2111, 2120, 2121, 10000, 10001, 10010, 10011, 10020, 10021, 10100, 10101
Offset: 0

Views

Author

Rick L. Shepherd, Jul 03 2005

Keywords

Comments

Exercise 14 on page 30 of the Long textbook is "Let m_1, m_2, m_3 ... be an infinite sequence of integers such that m_i >= 2 for all i. Let M_0 = 1 and M_i = Product_{j=1..i} m_j for all i >= 1. Show that every nonnegative integer r can be written uniquely in the form r = c_n M_n + c_(n-1) M_(n-1) + ... + c_1 M_1 + c_0 where c_n <> 0 for r <> 0 and 0 <= c_i < m_(i+1) for all i." The current sequence of terms a(r) = (c_n c_(n-1) ... c_1 c_0 concatenated) is one example of an infinite family of hybrid representations (just using only 2 and 3). For the m_i, this sequence uses A010693. Then the corresponding M_i are A026549. Thus the places reading from right have values (1,2,2*3,2*3*2,2*3*2*3,...) = A026549. The (ternary) digit 2 may only appear in the even positions counting from the rightmost as position 1. Appending "00" to any term multiplies the number by 6.
However, appending a single "0" to a term multiplies the number by 2 or by 3 or produces an invalid string of digits -- or even none of the above (110 => 1100, 8 becomes 18) -- depending upon the original number and its length.

Examples

			a(29) = 2021 as 29 = 2*12 + 0*6 + 2*2 + 1*1.
		

References

  • Calvin T. Long, Elementary Introduction to Number Theory, 2nd ed., D.C. Heath and Company, 1972, p. 30.

Crossrefs

Cf. A010693 (2, 3, 2, 3, ...), A026549 (place values), A089293 (sum of digits).
Cf. A055643 (Babylonian numbers), A007623 (numbers in factorial base), A049345 (numbers in primorial base), A007088 (numbers in base 2: binary), A007089 (numbers in base 3: ternary).

Programs

  • PARI
    my(table=[0,1,10,11,20,21]); a(n) = fromdigits(apply(d->table[d+1], digits(n,6)), 100); \\ Kevin Ryde, Aug 03 2021
    
  • PARI
    A010693(n) = if(n%2, 2, 3) \\ Function m is A010693 with index 1 here.
    {\\ The function b(n, m) works for all nonnegative n and every sequence m of (mixed or constant) radices as described above.
    my(c, d, k, ntmp, p, v, x); b(n, m) = if(n < 0, , v = [1]; k = 0;
    while(1, k++; p = v[#v]*m(k); if(p <= n, v = concat(v, p), break));
    ntmp = n; c = [];
    forstep(i = #v, 1, -1, d = ntmp\v[i]; c = concat(c, d); ntmp = ntmp - d*v[i]);
    x = 10; if(vecmax(c) < x, eval(Pol(c, 'x)), c))
    \\ returned value is a vector of decimal coefficients if any calculated
    \\ digit is larger than 9 (i.e., not suitable as an OEIS term)
    }
    a(n) = b(n, A010693) \\ Rick L. Shepherd, Aug 04 2021
  • Python
    a109827 = lambda n: 100 * a109827(n // 6) + 10 * ((n % 6) // 2) + n % 2 if n else 0 # David Radcliffe, Aug 03 2021
    
Showing 1-10 of 16 results. Next