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

A004793 a(1)=1, a(2)=3; a(n) is least k such that no three terms of a(1), a(2), ..., a(n-1), k form an arithmetic progression.

Original entry on oeis.org

1, 3, 4, 6, 10, 12, 13, 15, 28, 30, 31, 33, 37, 39, 40, 42, 82, 84, 85, 87, 91, 93, 94, 96, 109, 111, 112, 114, 118, 120, 121, 123, 244, 246, 247, 249, 253, 255, 256, 258, 271, 273, 274, 276, 280, 282, 283, 285, 325, 327, 328, 330, 334, 336, 337, 339, 352, 354
Offset: 1

Views

Author

Keywords

Crossrefs

Equals A186776(n)+1, A033160(n)-1, A033163(n)-2.
Row 1 of array in A093682.

Programs

  • Maple
    a:= proc(n) local m, r, b; m, r, b:= n-1, 2-irem(n, 2), 1;
          while m>0 do r:= r+b*irem(m, 2, 'm'); b:= b*3 od; r
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Nov 02 2021
  • Mathematica
    Select[Range[1000], MatchQ[IntegerDigits[#-1, 3], {(0|1)..., 0|2}]&] (* Jean-François Alcover, Jan 13 2019, after Tanya Khovanova in A186776 *)
  • PARI
    v[1]=1; v[2]=3; for(n=3,1000,f=2; m=v[n-1]+1; while(1, forstep(k=n-1,1,-1,if(v[k]<(m+1)/2,f=1; break); for(l=1,k-1,if(m-v[k]==v[k]-v[l],f=0; break)); if(f<2,break)); if(!f,m=m+1;f=2); if(f==1,break)); v[n]=m) \\ Ralf Stephan
    
  • PARI
    a(n)=if(n<1,1,if(n%2==0,3*a(n/2)-2-3*((n/2)%2),3*a((n-1)/2)-3*(((n-1)/2)%2))) \\ Ralf Stephan

Formula

a(n) = (3-n)/2 + 2*floor(n/2) + Sum_{k=1..n-1} 3^A007814(k)/2 = A003278(n) + [n is even], proved by Lawrence Sze, following a conjecture by Ralf Stephan.
a(n) = b(n-1), with b(0)=1, b(2n) = 3b(n) - 2 - 3[n odd], b(2n+1) = 3b(n)-3[n odd].

Extensions

Rechecked by David W. Wilson, Jun 04 2002

A033160 Begins with (2, 4); avoids 3-term arithmetic progressions.

Original entry on oeis.org

2, 4, 5, 7, 11, 13, 14, 16, 29, 31, 32, 34, 38, 40, 41, 43, 83, 85, 86, 88, 92, 94, 95, 97, 110, 112, 113, 115, 119, 121, 122, 124, 245, 247, 248, 250, 254, 256, 257, 259, 272, 274, 275, 277, 281, 283, 284, 286, 326, 328, 329, 331, 335, 337, 338, 340, 353, 355, 356, 358, 362
Offset: 1

Views

Author

Keywords

Crossrefs

a(n) = A186776(n)+2 = A004793(n)+1 = A033163(n)-1. Cf. A185256.

Programs

A033163 Begins with (3, 5) and avoids 3-term arithmetic progressions.

Original entry on oeis.org

3, 5, 6, 8, 12, 14, 15, 17, 30, 32, 33, 35, 39, 41, 42, 44, 84, 86, 87, 89, 93, 95, 96, 98, 111, 113, 114, 116, 120, 122, 123, 125, 246, 248, 249, 251, 255, 257, 258, 260, 273, 275, 276, 278, 282, 284, 285, 287, 327, 329, 330, 332, 336, 338, 339, 341, 354, 356, 357, 359, 363
Offset: 1

Views

Author

Keywords

References

  • Iacobescu, F. 'Smarandache Partition Type and Other Sequences.' Bull. Pure Appl. Sci. 16E, 237-240, 1997.
  • H. Ibstedt, A Few Smarandache Sequences, Smarandache Notions Journal, Vol. 8, No. 1-2-3, 1997, 170-183.

Crossrefs

a(n) = A186776(n)+3 = A004793(n)+2 = A033160(n)+1. Cf. A185256.

A338632 G.f. A(x) satisfies: 1 = A(x) - x/(A(x) - 3*x/(A(x) - 5*x/(A(x) - 7*x/(A(x) - 9*x/(A(x) - ...))))), a continued fraction relation.

Original entry on oeis.org

1, 1, 2, 14, 166, 2714, 55866, 1377942, 39493518, 1288115570, 47086272754, 1906554619166, 84711219819062, 4098314765667082, 214489189682087594, 12075596389435432230, 727783484288200558110, 46755528594469120151010, 3189788089674119448202722
Offset: 0

Views

Author

Paul D. Hanna, Nov 04 2020

Keywords

Examples

			G.f. A(x) = 1 + x + 2*x^2 + 14*x^3 + 166*x^4 + 2714*x^5 + 55866*x^6 + 1377942*x^7 + 39493518*x^8 + 1288115570*x^9 + 47086272754*x^10 + ...
where
1 = A(x) - x/(A(x) - 3*x/(A(x) - 5*x/(A(x) - 7*x/(A(x) - 9*x/(A(x) - 11*x/(A(x) - 13*x/(A(x) - 15*x/(A(x) - 17*x/(A(x) - 19*x/(A(x) - ...)))))))))), a continued fraction relation.
		

Crossrefs

Programs

  • PARI
    {a(n) = my(A=[1],CF=1); for(i=1,n, A=concat(A,0); for(i=1,#A, CF = Ser(A) - (2*(#A-i)+1)*x/CF ); A[#A] = -polcoeff(CF,#A-1) );A[n+1] }
    for(n=0,20,print1(a(n),", "))

Formula

a(n) = 2 (mod 4) for n > 1 (conjecture).
For n > 0, a(n) = 1 (mod 3) iff n = A191107(k) for some k >= 1 (conjecture).
For n > 0, a(n) = 2 (mod 3) iff n = A186776(k) for some k >= 2 where A186776 is the Stanley sequence S(0,2) (conjecture).
a(n) ~ 2^(2*n) * n^(n - 1/2) / (sqrt(Pi) * exp(n + 1/2)). - Vaclav Kotesovec, Nov 12 2020

A338636 G.f. A(x) satisfies: 1 = A(x) - x/(A(x) - 3^2*x/(A(x) - 5^2*x/(A(x) - 7^2*x/(A(x) - 9^2*x/(A(x) - ...))))), a continued fraction relation.

Original entry on oeis.org

1, 1, 8, 272, 19480, 2353568, 429016872, 110046546096, 37825128764472, 16793443888112960, 9358539226503013960, 6397425528561882140240, 5264539843826571207135320, 5134140710880677886077086432, 5855644914993764696284947092840
Offset: 0

Views

Author

Paul D. Hanna, Nov 04 2020

Keywords

Examples

			G.f. A(x) = 1 + x + 8*x^2 + 272*x^3 + 19480*x^4 + 2353568*x^5 + 429016872*x^6 + 110046546096*x^7 + 37825128764472*x^8 + 16793443888112960*x^9 + ...
where
1 = A(x) - x/(A(x) - 3^2*x/(A(x) - 5^2*x/(A(x) - 7^2*x/(A(x) - 9^2*x/(A(x) - 11^2*x/(A(x) - 13^2*x/(A(x) - 15^2*x/(A(x) - 17^2*x/(A(x) - 19^2*x/(A(x) - ...)))))))))), a continued fraction relation.
		

Crossrefs

Programs

  • PARI
    {a(n) = my(A=[1],CF=1); for(i=1,n, A=concat(A,0); for(i=1,#A, CF = Ser(A) - (2*(#A-i)+1)^2*x/CF ); A[#A] = -polcoeff(CF,#A-1) );A[n+1] }
    for(n=0,20,print1(a(n),", "))

Formula

a(n) = 0 (mod 8) for n > 1 (conjecture).
For n > 0, a(n) = 1 (mod 3) iff n = A191107(k) for some k >= 1 (conjecture).
For n > 0, a(n) = 2 (mod 3) iff n = A186776(k) for some k >= 2 where A186776 is the Stanley sequence S(0,2) (conjecture).
a(n) ~ 2^(6*n + 1) * n^(2*n - 1/2) / (Pi^(2*n + 1/2) * exp(2*n)). - Vaclav Kotesovec, Nov 12 2020

A186970 The oex analog of the Euler phi-function for the oex prime power factorization of positive integers.

Original entry on oeis.org

1, 1, 2, 3, 4, 3, 6, 4, 8, 5, 10, 7, 12, 8, 9, 12, 16, 11, 18, 12, 14, 14, 22, 9, 24, 16, 18, 18, 28, 13, 30, 16, 22, 21, 25, 24, 36, 24, 27, 17, 40, 17, 42, 30, 33, 29, 46, 27, 48, 32, 36, 36, 52, 24, 42, 25, 40, 37, 58, 28, 60, 40, 49, 48, 50, 30, 66, 48, 49, 35, 70, 32, 72, 48, 54, 54, 61, 36
Offset: 1

Views

Author

Vladimir Shevelev, Mar 01 2011

Keywords

Comments

Oex divisors d of an integer n are defined in A186443: those divisors d which are either 1 or numbers such that d^k || n (the highest power of d dividing n) has odd exponent k.
A positive number is called an oex prime if it has only two oex divisors; since every n >= 2 has at least two oex divisors, 1 and n, an oex prime q has only oex divisors 1 and q. A000430 is the sequence of oex primes q, i.e., A186643(q) = 2 iff q is an entry in A000430.
A unique factorization, called an oex prime power factorization, of integers n is introduced as follows: each factor p^e in the conventional prime power factorization n = Product(p^e) is written as (p^2)^(e/2) if e is even, and as (p^2)^floor(e/2)*p if e is odd. This represents n as a product of oex primes of the type q=p^2, with unconstrained exponents e/2, and of oex primes of the type q=p with exponents 0 or 1. (This is similar to splitting n into its squarefree part A007913(n) times A008833(n), followed by an ordinary prime factorization in both parts separately.)
Let n = q_1^a_1*q_2^a_2*... and m = q_1^b_1*q_2^b_2*..., a_i,b_i >= 0 be the oex prime power factorizations of n and m. Define the oex GCD of n and m as [n,m] = q_1^min(a_1,b_1) * q_2^min(a_2,b_2) * .... Then a(n) = Sum_{m=1..n, [m,n]=1} 1, the oex analog of the Euler-phi function.

Examples

			The oex prime power factorization of 16 is 4^2. Since [16,i]=1 for i=1, 2, 3, 5, 6, 7, 9, 10, 11, 13, 14, and 15, a(16)=12.
The oex prime power factorization of 9 is 9. Thus a(9)=8.
		

Crossrefs

Programs

  • Maple
    highpp := proc(n,d) local nshf,a ; if n mod d <> 0 then 0; else nshf := n ; a := 0 ; while nshf mod d = 0 do nshf := nshf /d ; a := a+1 ; end do: a; end if; end proc:
    oexgcd := proc(n,m) local a,p,kn,km ; a := 1 ; for p in numtheory[factorset](n) do kn := highpp(n,p) ; km := highpp(m,p) ; if type(kn,'even') = type(km,'even') then ; else kn := 2*floor(kn/2) ; km := 2*floor(km/2) ; end if; a := a*p^min(kn,km) ; end do: a ; end proc:
    A186970 := proc(n) local a,i; a := 0 ; for i from 1 to n do if oexgcd(n,i) = 1 then a := a+1 ; end if; end do: a; end proc:
    seq(A186970(n),n=1..80) ; # R. J. Mathar, Mar 18 2011

Formula

Let core(n) = p_1*...*p_r = A007913(n), n/core(n) = A008833(n) = q_1^c_1*...*q_t^c_t, where q_i are squares of primes.
If core(n)=1, then a(n) = n*Product_{j=1..r} (1-1/q_i); if core(n) tends to infinity, then a(n) ~ n * core(n) * Product_{i=1..t} (1-1/q_i) / Product_{j=1..r} (1+p_j).
a(n) <= A064380(n).
Showing 1-6 of 6 results.