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 41 results. Next

A335933 A fractal function, related to ruler functions. a(1) = 0; otherwise for m >= 0, a(3m) = 1, a(3m-1) = a(2m-1) + sign(a(2m-1)), a(3m+1) = a(2m+1) + sign(a(2m+1)).

Original entry on oeis.org

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

Views

Author

Peter Munn, Jun 30 2020

Keywords

Comments

We choose a form for the definition that shows clearly its relationship to A307744.
The odd bisection is essentially A087088.
If we add a(-1) = 0 to the definition and allow negative m (and therefore n), we get a symmetric function, that is a(n) = a(-n).
For k >= 1 numbers 1..k occur with the same periodic and mirror symmetries as in A307744 and in ruler function A051064. In A051064, k occurs 3 times more frequently than k+1. Here, and in A307744, k occurs 3/2 times more frequently than k+1, precisely 2^(k-1) times in every 3^k terms.

Crossrefs

Sequences with similar definitions: A205593, A307744.
A051064 has matching symmetries.
Odd bisection: A087088.

Programs

  • PARI
    a(n) = if (n==1, 0, if ((n%3) == 0, 1, if ((n%3)==1, my(k=(n-1)/3, aa = a(2*k+1)); aa+sign(aa),  my(k=(n+1)/3, aa = a(2*k-1)); aa+sign(aa)))); \\ Michel Marcus, Jul 03 2020

A364222 Expansion of Sum_{k>=0} 3^k * x^(3^k) / (1 - x^(3^k))^2.

Original entry on oeis.org

1, 2, 6, 4, 5, 12, 7, 8, 27, 10, 11, 24, 13, 14, 30, 16, 17, 54, 19, 20, 42, 22, 23, 48, 25, 26, 108, 28, 29, 60, 31, 32, 66, 34, 35, 108, 37, 38, 78, 40, 41, 84, 43, 44, 135, 46, 47, 96, 49, 50, 102, 52, 53, 216, 55, 56, 114, 58, 59, 120, 61, 62, 189, 64, 65, 132, 67, 68, 138, 70, 71, 216, 73, 74
Offset: 1

Views

Author

Seiichi Manyama, Jul 14 2023

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := n * (IntegerExponent[n, 3] + 1); Array[a, 100] (* Amiram Eldar, Jul 14 2023 *)
  • PARI
    a(n) = n*(valuation(n, 3)+1);

Formula

a(n) = n * A051064(n).
If n == 0 (mod 3), a(n) = n + 3 * a(n/3) otherwise a(n) = n.
From Amiram Eldar, Jul 14 2023: (Start)
Multiplicative with a(3^e) = (e+1)*3^e and a(p^e) = p*e if p != 3.
Dirichlet g.f.: (3^s/(3^s-3)) * zeta(s-1).
Sum_{k=1..n} a(k) ~ (3/4)*n^2. (End)

A168570 Exponent of 3 in 2^n - 1.

Original entry on oeis.org

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

Views

Author

Martins Opmanis, Nov 30 2009

Keywords

Comments

Records: a(A025192(n)) = n and a(k) < n for k < A025192(n). [Joerg Arndt, Apr 07 2014]

Examples

			For n=6, 2^6 - 1 = 63. Greatest divisor of 63 which is a power of 3 is 9 (3^2).
		

Crossrefs

Cf. A051064 (without the zeros).

Programs

  • Maple
    a:= n-> padic[ordp](2^n-1, 3):
    seq(a(n), n=1..120);  # Alois P. Heinz, Mar 27 2017
  • Mathematica
    Table[IntegerExponent[2^n - 1, 3], {n, 100}] (* T. D. Noe, Apr 13 2014 *)
  • PARI
    vector(100,n,valuation(2^n-1,3)) /* Joerg Arndt, Jun 13 2011 */

A332202 Largest k >= 0 such that 3^k divides 2^(2^n-1) + 1.

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Mar 05 2020

Keywords

Comments

Behaves like a mixture of 2-adic and 3-adic ruler function, cf. formula.

Examples

			a(0) = 0 since 2^(2^0-1) + 1 = 2^0 + 1 = 2 is not divisible by 3.
a(1) = 1 since 2^(2^1-1) + 1 = 2^1 + 1 = 3 is divisible just once by 3.
a(2) = 2 since 2^(2^2-1) + 1 = 2^3 + 1 = 9 is divisible by 3^2.
a(3) = 1 since 2^(2^4-1) + 1 = 2^15 + 1 = 32769 is divisible only once by 3.
		

Crossrefs

Cf. A007949, A051064, A001511 (2-adic ruler)

Programs

  • PARI
    apply( {A332202(n)=if(bittest(n,0), 1, n, valuation(n\2,3)+2)}, [0..99])

Formula

For all n > 0, a(2n-1) = 1; a(2n) = 2 + A007949(n) = 1 + A051064(n).

A366922 a(n) is the exponent of 3 in the prime factorization of 10^n - 1.

Original entry on oeis.org

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

Views

Author

Hugo Pfoertner, Oct 28 2023

Keywords

Comments

1

Crossrefs

Programs

  • Mathematica
    a[n_]:=IntegerExponent[10^n-1,3]; Array[a,90] (* Stefano Spezia, Oct 28 2023 *)
  • PARI
    a366922(n) = valuation(10^n-1,3)
    
  • Python
    def A366922(n):
        c = 0
        a, b = divmod(10**n-1, 3)
        while b == 0:
            a, b = divmod(a, 3)
            c += 1
        return c # Chai Wah Wu, Oct 29 2023

Formula

a(n) = A007949(10^n - 1).
a(n) = A007949(n) + 2 = A051064(n) + 1.

A373438 Expansion of Sum_{k>=1} k * x^(3^(k-1)) / (1 - x^(3^(k-1))).

Original entry on oeis.org

1, 1, 3, 1, 1, 3, 1, 1, 6, 1, 1, 3, 1, 1, 3, 1, 1, 6, 1, 1, 3, 1, 1, 3, 1, 1, 10, 1, 1, 3, 1, 1, 3, 1, 1, 6, 1, 1, 3, 1, 1, 3, 1, 1, 6, 1, 1, 3, 1, 1, 3, 1, 1, 10, 1, 1, 3, 1, 1, 3, 1, 1, 6, 1, 1, 3, 1, 1, 3, 1, 1, 6, 1, 1, 3, 1, 1, 3, 1, 1, 15, 1, 1, 3, 1, 1, 3, 1, 1, 6, 1, 1, 3, 1, 1, 3, 1, 1, 6, 1, 1, 3, 1, 1, 3
Offset: 1

Views

Author

Ilya Gutkovskiy, Jun 05 2024

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 105; CoefficientList[Series[Sum[k x^(3^(k - 1))/(1 - x^(3^(k - 1))), {k, 1, Floor[Log[3, nmax]] + 1}], {x, 0, nmax}], x] // Rest
    Table[Binomial[IntegerExponent[3 n, 3] + 1, 2], {n, 1, 105}]
  • PARI
    a(n) = {my(e = valuation(n, 3)); (e+1)*(e+2)/2;} \\ Amiram Eldar, Jun 27 2024

Formula

a(n) = A000217(A051064(n)).
From Vaclav Kotesovec, Jun 25 2024: (Start)
Dirichlet g.f.: zeta(s) * (3^s/(3^s-1))^2.
Sum_{k=1..n} a(k) ~ 9*n/4 - log(n)*(log(n) + 2*log(6*Pi))/(4*log(3)^2). (End)
Multiplicative with a(p^e) = (e+1)*(e+2)/2 if p = 3 and 1 if p != 3. - Amiram Eldar, Jun 27 2024

A382487 The number of divisors of n whose largest prime factor is 3.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Mar 29 2025

Keywords

Comments

The number of 3-smooth divisors of n that are not powers of 2.
The number of terms of A065119 that divide n.

Crossrefs

Programs

  • Mathematica
    a[n_] := (IntegerExponent[n, 2] + 1) * IntegerExponent[n, 3]; Array[a, 100]
  • PARI
    a(n) = (valuation(n, 2) + 1) * valuation(n, 3);

Formula

a(n) = A072078(n) - A001511(n).
a(n) = A001511(n) * A007949(n).
a(n) = 0 if and only if n is in A001651.
a(n) = 1 if and only if n is in A306771.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1.
In general, the asymptotic mean of the number prime(k+1)-smooth divisors of n that are not prime(k)-smooth, for k >= 1, is (1/(prime(k+1)-1)) * Product_{i=1..k} (prime(i)/(prime(i)-1)).
Dirichlet g.f.: (zeta(s)/(1-1/2^s))*(1/(1-1/3^s) - 1).

A074724 Highest power of 3 dividing F(4n) where F(k) is the k-th Fibonacci number.

Original entry on oeis.org

3, 3, 9, 3, 3, 9, 3, 3, 27, 3, 3, 9, 3, 3, 9, 3, 3, 27, 3, 3, 9, 3, 3, 9, 3, 3, 81, 3, 3, 9, 3, 3, 9, 3, 3, 27, 3, 3, 9, 3, 3, 9, 3, 3, 27, 3, 3, 9, 3, 3, 9, 3, 3, 81, 3, 3, 9, 3, 3, 9, 3, 3, 27, 3, 3, 9, 3, 3, 9, 3, 3, 27, 3, 3, 9, 3, 3, 9, 3, 3, 243, 3, 3, 9, 3, 3, 9, 3, 3, 27, 3, 3, 9, 3, 3, 9, 3, 3
Offset: 1

Views

Author

Benoit Cloitre, Sep 04 2002

Keywords

Comments

If m == 1, 2 or 3 (mod 4) then F(m) is not divisible by 3.

Crossrefs

Programs

  • Mathematica
    Table[3^IntegerExponent[Fibonacci[4n],3],{n,100}] (* Harvey P. Dale, Jun 03 2012 *)
  • PARI
    a(n) = 3^valuation(fibonacci(4*n), 3); \\ Michel Marcus, May 13 2022

Formula

If k == 1 or 2 (mod 3) then a(3^m*k) = 3^(m+1) for m>=0.
a(n) = A038500(A033888(n)). - Amiram Eldar, May 13 2022
a(n) = 3^A051064(n) (conjectured). - Michel Marcus, May 17 2022
Conjecture: a(n) = (sigma(3*n) - sigma(n))/(sigma(3*n) - 3*sigma(n)), where sigma(n) = A000203(n). Equivalently, a(n) = A088838(n) - A074724(n). - Peter Bala, Jun 10 2022

A122005 Triangle read by rows: n-th row starts with n and continues with 1/3 the previous value as long as that is an integer.

Original entry on oeis.org

1, 2, 3, 1, 4, 5, 6, 2, 7, 8, 9, 3, 1, 10, 11, 12, 4, 13, 14, 15, 5, 16, 17, 18, 6, 2, 19, 20, 21, 7, 22, 23, 24, 8, 25, 26, 27, 9, 3, 1, 28, 29, 30, 10, 31, 32, 33, 11, 34, 35, 36, 12, 4, 37, 38, 39, 13, 40, 41, 42, 14, 43, 44, 45, 15, 5, 46, 47, 48, 12, 4, 49, 50, 51, 17
Offset: 1

Views

Author

Jonathan Vos Post, Oct 14 2006

Keywords

Comments

A fractal sequence, which is to 3 as A123390 is to 2. Row lengths are A051064 3^a(n) exactly divides 3*n. Or, 3-adic valuation of 3*n.

Examples

			Triangle starts:
1;
2;
3, 1;
4;
5;
6, 2;
7;
8;
9, 3, 1;
10;
11;
12, 4;
13;
14;
15, 5;
16;
		

Crossrefs

Programs

  • Mathematica
    Flatten[Function[n,NestWhile[Append[#, Last[#]/3] &, {n}, Last[#]/3 == Floor[Last[#]/3] &]][#] & /@ Range[50]] (* Birkas Gyorgy, Apr 14 2011 *)

Formula

a(1) = 1, for n > 1, if 3|a(n-1) then a(n) = a(n-1)/3, otherwise a(n) = (max_{k

A284413 Exponent of 3 in 2^n + 1.

Original entry on oeis.org

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

Author

Jon E. Schoenfield, Mar 26 2017

Keywords

Comments

Records: a(3^(n-1)) = n and a(k) < n for k < 3^(n-1).
Multiplicative because A051064 is. - Andrew Howroyd, Jul 28 2018

Examples

			a(27) = 4 because 2^27 + 1 = 134217729 = 3^4 * 19 * 87211.
		

Crossrefs

Cf. A051064, A168570 (exponent of 3 in 2^n - 1).

Programs

  • Magma
    [IsEven(n) select 0 else Factorization(3*n)[1][2]: n in [1..87]];
    
  • Mathematica
    Table[If[OddQ[n], IntegerExponent[3n, 3], 0], {n, 100}] (* Indranil Ghosh, Mar 27 2017 *)
  • PARI
    a(n) = if(n%2, if(n<1, 0, 1 + valuation(n, 3)), 0); \\ Indranil Ghosh, Mar 27 2017

Formula

a(n) = A051064(n) if n is odd, 0 otherwise.
Asymptotic mean: lim_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 3/2. - Amiram Eldar, Sep 11 2020
From Amiram Eldar, Dec 27 2022: (Start)
Multiplicative with a(2^e) = 0, a(3^e) = e+1, and a(p^e) = 1 if p >= 5.
Dirichlet g.f.: zeta(s)*(1-1/2^s)/(1-1/3^s). (End)
Previous Showing 31-40 of 41 results. Next