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-27 of 27 results.

A265578 LCM-transform of number of divisors function (A000005).

Original entry on oeis.org

1, 2, 1, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

N. J. A. Sloane, Jan 02 2016

Keywords

Comments

Terms larger than one occur at n = 2, 4, 6, 16, 24, 36, 64, 120, 840, 900, 1296, 7560, 44100, 46656, 83160, ... - Antti Karttunen, Nov 06 2018

Crossrefs

Cf. A000005.
Other LCM-transforms are A061446, A265574, A265575, A265576, A265577.

Programs

  • Maple
    LCMXfm:=proc(a) local L,i,n,g,b;
    L:=nops(a);
    g:=Array(1..L,0); b:=Array(1..L,0);
    b[1]:=a[1]; g[1]:=a[1];
    for n from 2 to L do g[n]:=ilcm(g[n-1],a[n]); b[n]:=g[n]/g[n-1]; od;
    lprint([seq(b[i],i=1..L)]);
    end;
    with(numtheory);
    t1:=[seq(tau(n),n=1..100)];
    LCMXfm(t1);
  • Mathematica
    LCMXfm[a_List] := Module[{L = Length[a], b, g}, b[1] = g[1] = a[[1]]; b[] = 0; g[] = 0; Do[g[n] = LCM[g[n-1], a[[n]]]; b[n] = g[n]/g[n-1], {n, 2, L}]; Array[b, L]];
    LCMXfm[Table[DivisorSigma[0, n], {n, 1, 100}]] (* Jean-François Alcover, Dec 05 2017, from Maple *)
  • PARI
    up_to = 16384;
    LCMtransform(v) = { my(len = length(v), b = vector(len), g = vector(len)); b[1] = g[1] = 1; for(n=2,len, g[n] = lcm(g[n-1],v[n]); b[n] = g[n]/g[n-1]); (b); };
    v265578 = LCMtransform(vector(up_to,i,numdiv(i)));
    A265578(n) = v265578[n]; \\ Antti Karttunen, Nov 06 2018

A306825 Primitive part of A001353(n).

Original entry on oeis.org

1, 4, 15, 14, 209, 13, 2911, 194, 2703, 181, 564719, 193, 7865521, 2521, 34945, 37634, 1525870529, 2701, 21252634831, 37441, 6779137, 489061, 4122901604639, 37633, 274758906449, 6811741, 19726764303, 7263361, 11140078609864049, 40321, 155161278879431551
Offset: 1

Views

Author

Jianing Song, Mar 16 2019

Keywords

Comments

A prime p is called a unique-period prime in base b if there is no other prime q such that the period length of 1/q is equal to that of 1/p. If q = a(2p) = A001353(2*p)/(4*A001353(p)) = ((2 + sqrt(3))^p + (2 - sqrt(3))^p)/4 is prime (this happens for p = 3, 5, 7, 11, 13, 17, 19, 79, 151, 199, 233, 251, 317, ...), where p is an odd prime, then q is a unique-period prime in base b = (sqrt(12*q^2 - 3) - 1)/2 (1/q has period length 3) as well as in base b' = (sqrt(12*q^2 - 3) + 1)/2 (1/q has period length 6). For example, a(6) = 13 is prime, so 13 is the only prime whose reciprocal has period length 3 in base 22 and the only prime whose reciprocal has period length 6 in base 23. Compare: If q = A000129(p) = A008555(p), then q is a unique-period prime in base b = sqrt(2*q^2 - 1) (1/q has period length 4).
By Lucas-Lehmer test, p is a Mersenne prime > 3 if and only if the smallest k such that p divides a(k) is k = (p - 1)/2.
For primes p, p^2 divides a(k) for some k if and only if p = 2 or p is in A238490. If p > 2, the only possible values for k are the divisors of (p - Legendre(3,p))/2 (e.g., 103^2 divides a(52) = 53028360515521 = 103^2 * 4998431569).
Conjecturally there must be infinitely many primes p such that a(p) is prime, but no such p is known. [By the formula below, there is no such p. - Jianing Song, Oct 31 2024]

Examples

			For n = 8 we have: a(1) = A001353(1), a(1)*a(2) = A001353(2), a(1)*a(2)*a(4) = A001353(4), a(1)*a(2)*a(4)*a(8) = A001353(8). The solution is a(1) = 1, a(2) = 4, a(4) = 14 and a(8) = 194.
		

Crossrefs

Similar sequences: A061446, A008555.

Programs

  • PARI
    b(n) = if(n==1, [1], my(v=vector(n)); v[1]=1; v[2]=4; for(i=3, n, v[i]=4*v[i-1]-v[i-2]); v)
    a(n) = my(d=divisors(n)); prod(i=1, #d, (b(n)[d[i]])^moebius(n/d[i]))

Formula

Product_{d|n} a(d) = A001353(n), that is, a(n) = A001353(n)/(Product_{dA001353(d)^mu(n/d), where mu = A008683.
a(n) = A309040(2*n) for even n; A309040(n)*A309040(2*n) for odd n > 1. - Jianing Song, Oct 31 2024

A119997 Sum of all matrix elements of n X n matrix M[i,j] = (-1)^(i+j)*Fibonacci[i+j-1].

Original entry on oeis.org

1, 1, 4, 5, 17, 32, 97, 225, 628, 1573, 4225, 10880, 28769, 74849, 196708, 513765, 1347025, 3523360, 9229441, 24154625, 63251156, 165571781, 433507969, 1134881280, 2971250497, 7778684737, 20365103812, 53316141125, 139584105233, 365434903328, 956722661665
Offset: 1

Views

Author

Alexander Adamchuk, Aug 03 2006

Keywords

Comments

Prime p divides a(p-1) for p={5,11,19,29,31,41,59,61,71,...} = A038872[n] Primes congruent to {0, 1, 4} mod 5. Also odd primes where 5 is a square mod p. p^2 divides a(p-1) for prime p={11,19,29,31,41,59,61,71,...} = A045468[n] Primes congruent to {1, 4} mod 5. Square prime divisors of a(n) up to n=50 are{2,3,5,7,11,13,19,23,29,31,41,47,89,101,139,151,199,211,461,521,3571,9349}, It appears that square prime divisors of a(n) belong to A061446[n] Primitive part of Fibonacci(n), A001578[n] Smallest primitive prime factor of Fibonacci number F(n) and A072183[n] Sequence arising from factorization of the Fibonacci numbers. Sum[Sum[Fibonacci[i+j-1],{i,1,n}],{j,1,n}] = A120297[n]. Sum[Sum[i+j-1,{i,1,n}],{j,1,n}] = n^3. Sum[Sum[(-1)^(i+j)*(i+j-1),{i,1,n}],{j,1,n}] = n for odd n and = 0 for even n.

Examples

			Matrix begins:
1 -1 2 -3 5
-1 2 -3 5 -8
2 -3 5 -8 13
-3 5 -8 13 -21
5 -8 13 -21 34
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[Sum[(-1)^(i+j)*Fibonacci[i+j-1],{i,1,n}],{j,1,n}],{n,1,50}]
  • PARI
    a(n) = sum(i=1, n, sum(j=1, n, (-1)^(i+j)*fibonacci(i+j-1))) \\ Colin Barker, Mar 26 2015
    
  • PARI
    Vec(-x*(x^3+2*x-1)/((x-1)*(x^2-3*x+1)*(x^2-x-1)) + O(x^100)) \\ Colin Barker, Mar 26 2015

Formula

a(n) = Sum[Sum[(-1)^(i+j)*Fibonacci[i+j-1],{i,1,n}],{j,1,n}].
a(n) = 3*a(n-1)+a(n-2)-7*a(n-3)+5*a(n-4)-a(n-5) for n>5. - Colin Barker, Mar 26 2015
G.f.: -x*(x^3+2*x-1) / ((x-1)*(x^2-3*x+1)*(x^2-x-1)). - Colin Barker, Mar 26 2015

A126069 Generates A001350, the associated Mersenne numbers; A001350(n)=Product[a(d)] for d|n.

Original entry on oeis.org

1, 1, 4, 5, 11, 4, 29, 9, 19, 11, 199, 4, 521, 29, 31, 49, 3571, 19, 9349, 25, 211, 199, 64079, 36, 15251
Offset: 1

Views

Author

John W. Layman, Feb 28 2007

Keywords

Comments

A 2001 Iranian Mathematical Olympiad question shows that such a generating sequence {a(n)} exists for the sequence {S(n)} whenever gcd(S(m),S(n)) = S(gcd(m,n)).

Examples

			The divisors of 6 are 1,2,3,6 and a(1)*a(2)*a(3)*a(6)=1*1*4*4=16, which is, in fact, A001350(6).
		

Crossrefs

A262341 Largest primitive prime factor of Fibonacci number F(n), or 1 if no primitive.

Original entry on oeis.org

1, 1, 2, 3, 5, 1, 13, 7, 17, 11, 89, 1, 233, 29, 61, 47, 1597, 19, 113, 41, 421, 199, 28657, 23, 3001, 521, 109, 281, 514229, 31, 2417, 2207, 19801, 3571, 141961, 107, 2221, 9349, 135721, 2161, 59369, 211, 433494437, 307, 109441, 461, 2971215073, 1103, 6168709, 151
Offset: 1

Views

Author

Jonathan Sondow, Oct 12 2015

Keywords

Comments

Carmichael proved that a(n) > 1 if n > 12.
See A001578 (smallest primitive prime factor of F(n)) and A061446 (primitive part of F(n)) for more links.

Examples

			The prime factors of F(46)= 139 * 461 * 28657 that do not divide any smaller Fibonacci number are 139 and 461, so a(46) = 461.
		

Crossrefs

Programs

  • Mathematica
    prms={}; Table[f=First/@FactorInteger[Fibonacci[n]]; p=Complement[f, prms]; prms=Join[prms, p]; If[p=={}, 1, Last[p]], {n, 50}]
  • Perl
    use ntheory ":all"; my %s; for (1..100) { my @f = factor(lucasu(1,-1,$)); pop @f while @f && $s{$f[-1]}++; say "$ ", $f[-1] || 1; }  # Dana Jacobsen, Oct 13 2015

A274584 Composite numbers n such that primitive part of Fibonacci(n) is prime.

Original entry on oeis.org

4, 8, 9, 10, 14, 15, 16, 18, 20, 21, 22, 26, 28, 30, 32, 33, 34, 35, 38, 39, 40, 42, 45, 51, 52, 54, 60, 62, 63, 65, 66, 72, 74, 75, 76, 82, 93, 94, 98, 105, 106, 111, 112, 119, 121, 122, 123, 124, 132, 135, 136, 140, 142, 144, 145, 152, 156, 158, 160, 172, 180
Offset: 1

Views

Author

Arkadiusz Wesolowski, Jun 29 2016

Keywords

Comments

For every n > 1, A105602(a(n)) > 1.

Crossrefs

Cf. A061446. Supersequence of A061254.

Programs

  • Magma
    lst:=[]; for n in [4..180] do if not IsPrime(n) then d:=Divisors(n); p:=Truncate(&*[Fibonacci(d[i])^MoebiusMu(Truncate(n/d[i])): i in [1..#d]]); if IsPrime(p) then Append(~lst, n); end if; end if; end for; lst;

A309041 Irregular table read by rows: Let P(n,x) be the (monic) minimal polynomial of 2i*cos(Pi/n), where i = sqrt(-1) is the imaginary unit, then a(n,k) = [x^(2k)] P(n,x), n >= 3.

Original entry on oeis.org

1, 1, 2, 1, 1, 3, 1, 3, 1, 1, 6, 5, 1, 2, 4, 1, 1, 9, 6, 1, 5, 5, 1, 1, 15, 35, 28, 9, 1, 1, 4, 1, 1, 21, 70, 84, 45, 11, 1, 7, 14, 7, 1, 1, 24, 26, 9, 1, 2, 16, 20, 8, 1, 1, 36, 210, 462, 495, 286, 91, 15, 1, 3, 9, 6, 1, 1, 45, 330, 924, 1287, 1001, 455, 120, 17, 1
Offset: 3

Views

Author

Jianing Song, Jul 08 2019

Keywords

Comments

For n >= 3, it is easy to see that [x^(2k+1)] P(n,x) = 0, so they are omitted.
Row n (n >= 3) has length A023022(n) + 1 = phi(n)/2 + 1.
Let {U(n,x)} be defined as: U(0,x) = 0, U(1,x) = 1, U(n,x) = x*U(n-1,x) + U(n-2,x) for n >= 2, then U(n,x) = Product_{k|n, k>=2} P(k,x) for n > 0, because U(n,x) = Product_{m=1..n-1} (x - 2i*cos(Pi*m/n)) for n > 0.

Examples

			P(1,x) = x^2 + 4;
P(2,x) = x;
P(3,x) = x^2 + 1;
P(4,x) = x^2 + 2;
P(5,x) = x^4 + 3x^2 + 1;
P(6,x) = x^2 + 3;
P(7,x) = x^6 + 5x^4 + 6x^2 + 1;
P(8,x) = x^4 + 4x^2 + 2;
P(9,x) = x^6 + 6x^4 + 9x^2 + 1;
P(10,x) = x^4 + 5x^2 + 5;
...
		

Crossrefs

Cf. A232624.
Cf. P(n,k): A061446 (k=1), A008555 (k=2), A253807 (k=3);
Cf. also A023022, A008683.

Programs

  • Mathematica
    ro[n_] := (P = CoefficientList[p = MinimalPolynomial[2*I*Cos[Pi/n], x], x^2]; P); Flatten[Table[ro[n], {n, 3, 30}]]
  • PARI
    U(n) = sum(i=0, (n-1)/2,binomial(n,2*i+1)*(poly/2)^(n-2*i-1)*((poly^2+4)/4)^i)
    P(n) = if(n==1, poly^2+4, my(v=divisors(n)); prod(i=1, #v, U(n/v[i])^moebius(v[i])))
    a(n,k) = polcoeff(P(n),2*k)

Formula

P(n,x) = Product_{0<=m<=n, gcd(m, n)=1} (x - 2i*cos(Pi*m/n)).
Equivalently, P(n,x) = Product_{0<=m<=n/2, gcd(m, n)=1} (x^2 + 4*cos(Pi*m/n)) for n != 2. This shows that all terms are positive.
P(n,x) = Product_{k|n} U(n/k,x)^mu(k), mu = A008683.
Let MPR2(n,x) be the (monic) minimal polynomial of 2*cos(2*Pi/n) as defined in A232624, then: for even n > 2, P(n,x) = MPR2(2n,i*x)*(-1)^A023022(n); for odd n, P(n,x) = MPR2(n,i*x)*MPR2(2n,i*x)*(-1)^A023022(n), i = sqrt(-1).
For n > 2, P(n,x) = MPR2(n,-x^2-2)*(-1)^A023022(n).
For n > 1, P(n,1) = A061446(n), P(n,2) = A008555(n), P(n,3) = A253807(n), ...
For even n > 2, a(n,k) = (-1)^(A023022(n)-k)*A232624(2n,2k).
Previous Showing 21-27 of 27 results.