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

A078412 a(0) = 5, a(1) = 8; for n >1, a(n)=(a(n-1)+a(n-2))/3^n, where 3^n is the highest power of 3 dividing a(n-1)+a(n-2).

Original entry on oeis.org

5, 8, 13, 7, 20, 1, 7, 8, 5, 13, 2, 5, 7, 4, 11, 5, 16, 7, 23, 10, 11, 7, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2
Offset: 0

Views

Author

Yasutoshi Kohmoto, Dec 28 2002

Keywords

Crossrefs

Programs

  • Mathematica
    Join[{5, 8, 13, 7, 20, 1, 7, 8, 5, 13, 2, 5, 7, 4, 11, 5, 16, 7, 23, 10, 11, 7},LinearRecurrence[{0, 0, 1},{2, 1, 1},79]] (* Ray Chandler, Aug 25 2015 *)

Formula

a(3n-1)=2, a(3n)=1, a(3n+1)=1 for n>=8. - Sascha Kurz, Jan 04 2003

Extensions

More terms from Sascha Kurz, Jan 04 2003

A122257 Characteristic function of Pierpont primes (A005109).

Original entry on oeis.org

0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 29 2006

Keywords

Crossrefs

Cf. A005109, A010051, A065333, A122258 (partial sums).

Programs

  • Mathematica
    smooth3Q[n_] := n == 2^IntegerExponent[n, 2]*3^IntegerExponent[n, 3];
    a[n_] := Boole[PrimeQ[n] && smooth3Q[n - 1]];
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 16 2021 *)
  • PARI
    is3smooth(n) = my(m = n >> valuation(n, 2)); m == 3^valuation(m, 3);
    a(n) = isprime(n) && is3smooth(n-1); \\ Amiram Eldar, May 14 2025
  • Scheme
    (define (A122257 n) (if (= 1 n) 0 (if (= 1 (A065333 (- n 1))) (A010051 n) 0)))
    (define (A065333 n) (if (= 1 (A038502 (A000265 n))) 1 0))
    ;; Antti Karttunen, Dec 07 2017
    

Formula

a(n) = A010051(n) * A065333(n-1).
a(n) = if (n is prime) and (n-1 is 3-smooth) then 1 else 0.
a(n) = if n=1 then 0 else A122258(n) - A122258(n-1);
a(A122259(n)) = 0, a(A005109(n)) = 1.

A264983 Odd bisection of A263273.

Original entry on oeis.org

1, 3, 7, 5, 9, 19, 13, 21, 25, 11, 15, 23, 17, 27, 55, 37, 57, 73, 31, 39, 67, 49, 63, 61, 43, 75, 79, 29, 33, 65, 47, 45, 59, 41, 69, 77, 35, 51, 71, 53, 81, 163, 109, 165, 217, 91, 111, 199, 145, 171, 181, 127, 219, 235, 85, 93, 193, 139, 117, 175, 121, 201, 229, 103, 147, 211
Offset: 0

Views

Author

Antti Karttunen, Dec 05 2015

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{g, h}, g[x_] := x/3^IntegerExponent[x, 3]; h[x_] := x/g@ x; If[n == 0, 0, FromDigits[Reverse@ IntegerDigits[#, 3], 3] &@ g[n] h[n]]]; t = Select[f /@ Range@ 130, OddQ] (* Michael De Vlieger, Jan 04 2016, after Jean-François Alcover at A263273 *)
  • Python
    from sympy import factorint
    from sympy.ntheory.factor_ import digits
    from operator import mul
    def a030102(n): return 0 if n==0 else int(''.join(map(str, digits(n, 3)[1:][::-1])), 3)
    def a038502(n):
        f=factorint(n)
        return 1 if n==1 else reduce(mul, [1 if i==3 else i**f[i] for i in f])
    def a038500(n): return n/a038502(n)
    def a263273(n): return 0 if n==0 else a030102(a038502(n))*a038500(n)
    def a(n): return a263273(2*n + 1) # Indranil Ghosh, May 22 2017
  • Scheme
    (define (A264983 n) (A263273 (+ 1 n n)))
    

Formula

a(n) = A263273(2n + 1).

A264986 Even bisection of A263272; terms of A264974 doubled.

Original entry on oeis.org

0, 2, 4, 6, 8, 10, 12, 14, 32, 18, 20, 38, 24, 26, 28, 30, 16, 34, 36, 22, 40, 42, 68, 86, 96, 50, 104, 54, 56, 110, 60, 74, 92, 114, 44, 98, 72, 62, 116, 78, 80, 82, 84, 46, 100, 90, 64, 118, 48, 70, 88, 102, 52, 106, 108, 58, 112, 66, 76, 94, 120, 122, 284, 126, 176, 338, 204, 230, 248, 258, 140, 302, 288
Offset: 0

Views

Author

Antti Karttunen, Dec 05 2015

Keywords

Crossrefs

Programs

  • Python
    from sympy import factorint
    from sympy.ntheory.factor_ import digits
    from operator import mul
    def a030102(n): return 0 if n==0 else int(''.join(map(str, digits(n, 3)[1:][::-1])), 3)
    def a038502(n):
        f=factorint(n)
        return 1 if n==1 else reduce(mul, [1 if i==3 else i**f[i] for i in f])
    def a038500(n): return n/a038502(n)
    def a263273(n): return 0 if n==0 else a030102(a038502(n))*a038500(n)
    def a(n): return a263273(4*n)/2 # Indranil Ghosh, May 23 2017
  • Scheme
    (define (A264986 n) (A263272 (+ n n)))
    

Formula

a(n) = A263272(2*n).
a(n) = 2 * A264974(n).
a(n) = A263273(4*n)/2.

A264987 Odd bisection of A263272.

Original entry on oeis.org

1, 3, 5, 11, 9, 7, 13, 15, 23, 29, 33, 17, 35, 27, 19, 37, 21, 25, 31, 39, 41, 95, 45, 59, 113, 69, 77, 83, 87, 47, 101, 99, 65, 119, 51, 71, 89, 105, 53, 107, 81, 55, 109, 57, 73, 91, 111, 43, 97, 63, 61, 115, 75, 79, 85, 93, 49, 103, 117, 67, 121, 123, 203, 257, 285, 149, 311, 135, 167, 329, 177, 221, 275
Offset: 0

Views

Author

Antti Karttunen, Dec 05 2015

Keywords

Crossrefs

Programs

  • Python
    from sympy import factorint
    from sympy.ntheory.factor_ import digits
    from operator import mul
    def a030102(n): return 0 if n==0 else int(''.join(map(str, digits(n, 3)[1:][::-1])), 3)
    def a038502(n):
        f=factorint(n)
        return 1 if n==1 else reduce(mul, [1 if i==3 else i**f[i] for i in f])
    def a038500(n): return n/a038502(n)
    def a263273(n): return 0 if n==0 else a030102(a038502(n))*a038500(n)
    def a(n): return a263273(2*(2*n + 1))/2 # Indranil Ghosh, May 23 2017
  • Scheme
    (define (A264987 n) (A263272 (+ 1 n n)))
    

Formula

a(n) = A263272((2*n)+1).

A336457 a(n) = A065330(sigma(n)), where A065330 is fully multiplicative with a(2) = a(3) = 1, and a(p) = p for primes p > 3.

Original entry on oeis.org

1, 1, 1, 7, 1, 1, 1, 5, 13, 1, 1, 7, 7, 1, 1, 31, 1, 13, 5, 7, 1, 1, 1, 5, 31, 7, 5, 7, 5, 1, 1, 7, 1, 1, 1, 91, 19, 5, 7, 5, 7, 1, 11, 7, 13, 1, 1, 31, 19, 31, 1, 49, 1, 5, 1, 5, 5, 5, 5, 7, 31, 1, 13, 127, 7, 1, 17, 7, 1, 1, 1, 65, 37, 19, 31, 35, 1, 7, 5, 31, 121, 7, 7, 7, 1, 11, 5, 5, 5, 13, 7, 7, 1, 1, 5, 7, 49
Offset: 1

Views

Author

Antti Karttunen, Jul 24 2020

Keywords

Comments

Sequence removes prime factors 2 and 3 from the prime factorization of the sum of divisors of n.

Crossrefs

Programs

Formula

a(n) = A065330(A000203(n)) = A038502(A161942(n)).
Multiplicative with a(p^e) = A065330(1 + p + p^2 + ... + p^e).

A336504 3-practical numbers: numbers m such that the polynomial x^m - 1 has a divisor of every degree <= m in the prime field F_3[x].

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 9, 12, 15, 16, 18, 20, 24, 26, 27, 30, 32, 36, 39, 40, 42, 44, 45, 48, 52, 54, 56, 60, 63, 64, 66, 72, 78, 80, 81, 84, 88, 90, 96, 99, 100, 104, 105, 108, 112, 117, 120, 126, 128, 130, 132, 135, 140, 144, 150, 156, 160, 162, 165, 168, 176, 180
Offset: 1

Views

Author

Amiram Eldar, Jul 23 2020

Keywords

Comments

For a rational prime number p, a "p-practical number" is a number m such that the polynomial x^m - 1 has a divisor of every degree <= m in F_p[x], the prime field of order p.
A number m is 3-practical if and only if every number 1 <= k <= m can be written as Sum_{d|m} A007734(d) * n_d, where A007734(d) is the multiplicative order of 3 modulo the largest divisor of d not divisible by 3, and 0 <= n_d <= phi(d)/A007734(d).
The number of terms not exceeding 10^k for k = 1, 2, ... are 7, 41, 258, 1881, 15069, 127350, 1080749, ...

Crossrefs

Programs

  • Mathematica
    rep[v_, c_] := Flatten @ Table[ConstantArray[v[[i]], {c[[i]]}], {i, Length[c]}]; mo[n_, p_] := MultiplicativeOrder[p, n/p^IntegerExponent[n, p]]; ppQ[n_, p_] := Module[{d = Divisors[n]}, m = mo[#, p] & /@ d; ns = EulerPhi[d]/m; r = rep[m, ns]; Min @ Rest @ CoefficientList[Series[Product[1 + x^r[[i]], {i, Length[r]}], {x, 0, n}], x] >  0]; Select[Range[200], ppQ[#, 3] &]

A348932 Numbers k congruent to 1 or 5 mod 6, for which A348930(k) > k.

Original entry on oeis.org

7, 13, 19, 25, 31, 37, 43, 61, 67, 73, 79, 91, 97, 103, 109, 121, 127, 133, 139, 151, 157, 163, 175, 181, 193, 199, 211, 217, 223, 229, 241, 247, 259, 271, 277, 283, 289, 301, 307, 313, 325, 331, 337, 343, 349, 367, 373, 379, 397, 403, 409, 421, 427, 433, 439, 457, 463, 469, 475, 481, 487, 499, 511, 523, 529, 541
Offset: 1

Views

Author

Antti Karttunen, Nov 04 2021

Keywords

Comments

See comments in A348930.

Crossrefs

Programs

  • Mathematica
    s[n_] := n / 3^IntegerExponent[n, 3]; Select[Range[550], MemberQ[{1, 5}, Mod[#, 6]] && s[DivisorSigma[1, #]] > # &] (* Amiram Eldar, Nov 04 2021 *)
  • PARI
    A038502(n) = (n/3^valuation(n, 3));
    A348930(n) = A038502(sigma(n));
    isA348932(n) = ((n%2)&&(n%3)&&(A348930(n)>n));

A348933 Numbers k congruent to 1 or 5 mod 6, for which A348930(k^2) < k^2.

Original entry on oeis.org

7, 13, 19, 31, 35, 37, 43, 61, 65, 67, 73, 77, 79, 91, 95, 97, 103, 109, 119, 127, 133, 139, 143, 151, 155, 157, 161, 163, 175, 181, 185, 193, 199, 203, 209, 211, 215, 217, 221, 223, 229, 241, 247, 259, 271, 277, 283, 287, 299, 301, 305, 307, 313, 323, 325, 329, 331, 335, 337, 341, 349, 365, 367, 371, 373, 377, 379
Offset: 1

Views

Author

Antti Karttunen, Nov 04 2021

Keywords

Comments

Any hypothetical odd term y of A005820 must by necessity be a square. If y is also a nonmultiple of 3, then the square root x = A000196(y) of such a number y must satisfy the condition that for all nontrivial unitary divisor pairs d and x/d [with gcd(d,x/d) = 1, 1 < d < x], the other divisor should reside in this sequence, and the other divisor in A348934. The explanation is similar to the one given in A348738. See also comments in A348935.

Crossrefs

Programs

  • Mathematica
    s[n_] := n / 3^IntegerExponent[n, 3]; Select[Range[400], MemberQ[{1, 5}, Mod[#, 6]] && s[DivisorSigma[1, #^2]] < #^2 &] (* Amiram Eldar, Nov 04 2021 *)
  • PARI
    A038502(n) = (n/3^valuation(n, 3));
    A348930(n) = A038502(sigma(n));
    isA348933(n) = ((n%2)&&(n%3)&&(A348930(n^2)<(n^2)));

A165725 Largest divisor of n coprime to 30. I.e., a(n) = max { k | gcd(n, k) = k and gcd(k, 30) = 1 }.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 11, 1, 13, 7, 1, 1, 17, 1, 19, 1, 7, 11, 23, 1, 1, 13, 1, 7, 29, 1, 31, 1, 11, 17, 7, 1, 37, 19, 13, 1, 41, 7, 43, 11, 1, 23, 47, 1, 49, 1, 17, 13, 53, 1, 11, 7, 19, 29, 59, 1, 61, 31, 7, 1, 13, 11, 67, 17, 23, 7, 71, 1, 73, 37, 1, 19, 77, 13, 79, 1, 1, 41, 83, 7
Offset: 1

Views

Author

Barry Wells (wells.barry(AT)gmail.com), Sep 25 2009

Keywords

Comments

This is the sequence of the largest divisor of n which is coprime to 30. The product of the first 3 prime numbers is 2*3*5=30. This sequence gives the largest factor of n which does not include 2, 3 or 5 in its prime factorization.

Examples

			The largest factor of 1, 2, 3, 4, 5 and 6 not including the primes 2, 3 and 5 is 1. 7 is prime and therefore its sequence value is 7. For p > 5, p prime, gives a(p) = p. As 14 = 2*7, a(14)= 7. As 98 = 2*7*7, a(98)= 49.
		

Crossrefs

A051037 gives the smooth five numbers, numbers whose prime divisor only include 2, 3 and 5. A132740 gives the largest divisor of n coprime to 10. A065330 gives a(n) = max { k | gcd(n, k) = k and gcd(k, 6) = 1 }.
Largest divisor of n coprime to a prime factor of 30: A000265 (2), A038502 (3), A132739 (5).
Cf. A355582.

Programs

  • Mathematica
    a[n_] := n / Times @@ ({2, 3, 5}^IntegerExponent[n, {2, 3, 5}]); Array[a, 100] (* Amiram Eldar, Jul 10 2022 *)
  • PARI
    a(n)=n>>valuation(n,2)/3^valuation(n,3)/5^valuation(n,5) \\ Charles R Greathouse IV, Jul 16 2017

Formula

From Amiram Eldar, Jul 10 2022: (Start)
Multiplicative with a(p^e) = p^e if p >= 7 and 1 otherwise.
a(n) = n/A355582(n). (End)
Sum_{k=1..n} a(k) ~ (5/24) * n^2. - Amiram Eldar, Nov 28 2022
Dirichlet g.f.: zeta(s-1)*(2^s-2)*(3^s-3)*(5^s-5)/((2^s-1)*(3^s-1)*(5^s-1)). - Amiram Eldar, Jan 04 2023
Previous Showing 31-40 of 49 results. Next