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

A094044 Alternate prime and nonprime numbers not included earlier such that every concatenation of a pair of terms is a prime: a(2n) is nonprime and a(2n-1) is prime.

Original entry on oeis.org

2, 9, 7, 1, 3, 49, 19, 33, 13, 21, 11, 51, 47, 87, 31, 63, 17, 77, 23, 39, 29, 27, 41, 57, 37, 69, 59, 81, 61, 99, 67, 91, 73, 93, 43, 117, 79, 111, 71, 119, 53, 129, 83, 177, 89, 123, 113, 143, 107, 171, 103, 141, 97, 159, 157, 133, 109, 121, 139, 169, 151, 153, 137, 147
Offset: 1

Views

Author

Robert G. Wilson v, Apr 23 2004

Keywords

Comments

Conjecture: all members of A045572 are in the sequence. - Robert Israel, Oct 24 2017

Examples

			a(3)=7 => 97 is a prime but not necessarily 297 (in fact not a prime).
		

Crossrefs

Programs

  • Maple
    N:= 1000: # to get terms before the first term > N
    P, C:= selectremove(isprime, [1,$3..N]):
    dcat:= proc(x,y) 10^(1+ilog10(y))*x+y end proc:
    A[1]:= 2:
    for n from 2 do
      if n::even then
        for j from 1 to nops(C) do
          if isprime(dcat(A[n-1],C[j])) then
             A[n]:= C[j];
             C:= subsop(j=NULL,C);
             break
          fi
        od
      else
        for j from 1 to nops(P) do
          if isprime(dcat(A[n-1],P[j])) then
            A[n]:= P[j];
            P:= subsop(j=NULL,P);
            break
          fi
        od
      fi;
      if not assigned(A[n]) then break fi
    od:
    seq(A[i],i=1..n-1); # Robert Israel, Oct 24 2017
  • Mathematica
    p = Prime[ Range[ 500]]; np = Drop[ Complement[ Range[ 500], p], 1]; a[0] = 0; a[n_] := a[n] = Block[{k = 1, q = IntegerDigits[a[n - 1]]}, If[ OddQ[n], While[ !PrimeQ[ FromDigits[ Join[q, IntegerDigits[ p[[k]] ]]]], k++ ]; q = p[[k]]; p = Delete[p, k]; q, While[ !PrimeQ[ FromDigits[ Join[q, IntegerDigits[ np[[k]] ]]]], k++ ]; q = np[[k]]; np = Delete[np, k]; q]]; Table[ a[n], {n, 64}]

A165207 Period 4: repeat [2, 2, 4, 4].

Original entry on oeis.org

2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2
Offset: 0

Views

Author

Paul Curtz, Sep 07 2009

Keywords

Comments

Continued fraction expansion of (21+5*sqrt(26))/19 = A177153. - Klaus Brockhaus, May 03 2010
A045572(n)^a(n) == 1 (mod 10). For n>1, a(n) is the smallest positive exponent with this property. - Christina Steffan, Sep 08 2015

Crossrefs

Programs

Formula

a(n) = 2*A130658(n).
a(n) = A002378(n+1)/A064038(n+2) = A061037(4n+6)/A064038(n+2) = A061037(4n+6)/A061041(8n+12).
From R. J. Mathar, Sep 11 2009: (Start)
a(n) = a(n-1) - a(n-2) + a(n-3) for n>2.
G.f.: 2*(1+2*x^2)/((1-x)*(1+x^2)). (End)
a(n) = 3-cos(Pi*n/2)-sin(Pi*n/2). - R. J. Mathar, Oct 08 2011
a(n) = 2 + (2*floor(n/2) mod 4). - Wesley Ivan Hurt, Apr 20 2015
a(n) = a(n-4) for n>3. - Wesley Ivan Hurt, Jul 09 2016

Extensions

Edited, offset set to 0, by R. J. Mathar, Sep 11 2009

A204456 Coefficient array of numerator polynomials of the o.g.f.s for the sequence of odd numbers not divisible by a given prime.

Original entry on oeis.org

1, 1, 1, 4, 1, 1, 2, 4, 2, 1, 1, 2, 2, 4, 2, 2, 1, 1, 2, 2, 2, 2, 4, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1
Offset: 1

Views

Author

Wolfdieter Lang, Jan 24 2012

Keywords

Comments

The row length sequence of this array is p(m) = A000040(m) (the primes).
Row m, for m >= 1, lists the coefficients of the numerator polynomials N(p(m);x) = Sum_{k=0..p(m)-1} a(m,k)*x^k for the o.g.f. G(p(m);x) = x*N(p(m);x)/((1-x^(p(m)-1))*(1-x)) for the sequence a(p(m);n) of odd numbers not divisible by p(n). For m=1 one has a(2;n)=2*n-1, n >= 1, and for m > 1 one has a(p(m);n) = 2*n+1 + floor((n-(p(m)+1)/2)/(p(m)-1)), n >= 1, and a(p(m);0):=0. See A204454 for the m=5 sequence a(11;n), also for more details.
The rows of this array are symmetric. For m > 1 they are symmetric around the central 4.
The first (p(m)+1)/2 numbers of row number m, for m >= 2, are given by the first differences of the corresponding sequence {a(p(m);n)}, with a(p(m),0):=0. See a formula below. The proof is trivial for m=1, and clear for m >= 2 from a(p(m);n), for n=0,...,(p(m)+1)/2, which is {0,1,3,...,p-2,p+2}. - Wolfdieter Lang, Jan 26 2012

Examples

			The array starts
m,p\k  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 ...
1,2:   1  1
2,3:   1  4  1
3,5:   1  2  4  2  1
4,7:   1  2  2  4  2  2  1
5,11:  1  2  2  2  2  4  2  2  2  2  1
6,13:  1  2  2  2  2  2  4  2  2  2  2  2  1
7,17:  1  2  2  2  2  2  2  2  4  2  2  2  2  2  2  2  1
...
N(p(4);x) = N(7;x) = 1 + 2*x + 2*x^2 + 4*x^3 + 2*x^4 + 2*x^5 + x^6 = (1+x^2)*(1+2*x+x^2+2*x^3+x^4).
G(p(4);x) = G(7;x) = x*N(7;x)/((1-x^6)*(1-x)), the o.g.f. of
A162699. Compare this with the o.g.f. given there by _R. J. Mathar_, where the numerator is factorized also.
First difference rule: m=4: {a(7;n)} starts {0,1,3,5,9,...},
the first differences are {1,2,2,4,...}, giving the first (7+1)/2=4 entries of row number m=4 of the array. The other entries follow by symmetry. - _Wolfdieter Lang_, Jan 26 2012
		

Crossrefs

Cf. A000040, A005408 (p=2), A007310 (p=3), A045572 (p=5), A162699 (p=7), A204454 (p=11).

Formula

a(m,k) = [x^k]N(p(m);x), m>=1, k=0,...,p(m)-1, with the numerator polynomial N(p(m);x) for the o.g.f. G(p(m);x) of the sequence of odd numbers not divisible by the m-th prime p(m)=A000040(m). See the comment above.
Row m has the number pattern (exponents on a number indicate how many times this number appears consecutively):
m=1, p(1)=2: 1 1, and for m>=2:
m, p(m): 1 2^((p(m)-3)/2) 4 2^((p(m)-3)/2) 1.
a(m,k) = a(p(m);k+1) - a(p(m);k), m>=2, k=0,...,(p(m)-1)/2,
with the corresponding sequence {a(p(m);n)} of the odd numbers not divisible by p(m), with a(p(m);0):=0. For m=1: a(1,0) = a(2;1)-a(2;0). By symmetry around the center: a(m,(p(m)-1)/2+k) = a(m,(p(m)-1)/2-k), k=1,...,(p(m)-1)/2, m>=2. For m=1: a(1,1)=a(1,0). See a comment above. - Wolfdieter Lang, Jan 26 2012

A336893 Lexicographically earliest infinite sequence of distinct positive terms such that the sum of digits of the first n terms is coprime to their concatenation.

Original entry on oeis.org

1, 3, 7, 2, 4, 5, 9, 6, 13, 8, 19, 11, 15, 21, 10, 17, 22, 23, 12, 24, 25, 14, 27, 16, 20, 28, 26, 31, 29, 18, 33, 37, 35, 39, 40, 41, 34, 42, 44, 43, 32, 45, 30, 46, 47, 36, 49, 38, 48, 51, 55, 53, 61, 50, 57, 60, 63, 52, 59, 64, 62, 66, 67, 54, 65, 58, 68, 69
Offset: 1

Views

Author

Keywords

Comments

Conjecture: A permutation of the positive integers.
Comment from N. J. A. Sloane, Aug 15 2020: Is there a proof that this is well-defined, i.e. that the sequence exists? If so, the condition that a(1)=1 can be omitted from the definition.
Yes, this sequence is well defined: an upper limit for a(n+1) is given by N = concatenate(M, K) with M = max{ a(k); k <= n } and K = A068695(concatenate(a(1), ..., a(n), M)). This N is distinct from (since by construction larger than) all preceding terms, it will yield a prime number for the concatenation, certainly larger than its digit sum, so satisfies all required conditions. [This proof resulted from ideas from several OEIS editors and a new proof that A068695 is always well defined, see there.] - M. F. Hasler, Nov 09 2020

Examples

			Since a(1)=1, a(2) cannot be 2 because 1+2=3 and 3|12. However, 1+3=4 and GCD(13,4)=1, so a(2)=3.
		

References

  • G. H. Hardy and E. M. Wright. An Introduction to the Theory of Numbers, Oxford University Press,1945,Chapter II.
  • G.A. Jones and J. Mary Jones, Elementary Number Theory, London: Springer-Verlag, 2005, Chapter 2.

Crossrefs

Programs

  • Maple
    #Code by Carl Love; (Mapleprimes)
    Seq1 := proc(N::posint)
    local
      S:=Array(1 .. 1, [1]),
    SD:=1,
    C:=1,
      Used := table([1= ()]),
      k, j, C1, SD1;
      for k from 2 to N do
          for j from 2 do
              if not assigned(Used[j]) then
                 C1 := Scale10(C, length(j))+j;
                 SD1 := SD+`+`(convert(j, base, 10)[]);
                 if igcd(C1, SD1) = 1 then
                     C := C1; SD := SD1; Used[j] :=() ; S(k) := j;
                     break
                 end if
             end if
           end do
         end do;
        seq(x,x=S)
      end proc:
      Seq1(200);
  • Mathematica
    Nest[Append[#, Block[{k = 2, d = Map[IntegerDigits, #]}, While[Nand[FreeQ[#, k], GCD[FromDigits[#], Total[#]] &@ Flatten@ Append[d, IntegerDigits[k]] == 1], k++]; k]] &, {1}, 100]

A358990 a(n) is the product of the first n odd numbers not divisible by 5.

Original entry on oeis.org

1, 1, 3, 21, 189, 2079, 27027, 459459, 8729721, 183324141, 4216455243, 113844291561, 3301484455269, 102346018113339, 3377418597740187, 124964488116386919, 4873615036539089841, 199818216498102683481, 8592183309418415389683, 403832615542665523315101, 19787798161590610642439949
Offset: 0

Views

Author

Stefano Spezia, Dec 09 2022

Keywords

Comments

Unlike the factorial number n!, but like A356858(n), a(n) does not have trailing zeros.

Crossrefs

Cf. A358991 (number of zero digits), A358992 (number of digits), A358993 (number of nonzero digits).

Programs

  • Mathematica
    Table[Product[2*k+2*Floor[(k-3)/4]+1,{k,n}],{n,0,20}]
  • PARI
    f(n) = 2*n - 1 + (n+1)\4 * 2; \\ A045572
    a(n) = prod(k=1, n, f(k)); \\ Michel Marcus, Dec 10 2022

Formula

a(n) = Product_{k=1..n} A045572(k).

A358991 a(n) is the number of zero digits in the product of the first n odd numbers not divisible by 5.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 2, 1, 0, 2, 1, 1, 2, 2, 3, 2, 2, 2, 3, 2, 4, 5, 2, 4, 1, 3, 4, 5, 6, 9, 5, 4, 6, 4, 7, 7, 10, 5, 7, 10, 8, 9, 8, 4, 7, 4, 15, 9, 4, 7, 12, 9, 8, 14, 12, 5, 14, 12, 6, 11, 10, 14, 17, 17, 11, 19, 11, 15, 19, 15, 13, 14, 11, 19
Offset: 0

Views

Author

Stefano Spezia, Dec 09 2022

Keywords

Crossrefs

Cf. A358992 (number of digits), A358993 (number of nonzero digits).

Programs

  • Mathematica
    Table[Count[IntegerDigits[Product[2i+2Floor[(i-3)/4]+1, {i, n}]], 0], {n, 0, 80}]

Formula

a(n) = A055641(A356990(n)).

A358992 a(n) is the number of digits in the product of the first n odd numbers not divisible by 5.

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 5, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 26, 28, 29, 31, 33, 35, 36, 38, 40, 42, 44, 46, 48, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 82, 84, 86, 88, 90, 92, 94, 96, 99, 101, 103, 105, 107, 109, 112, 114, 116
Offset: 0

Views

Author

Stefano Spezia, Dec 09 2022

Keywords

Crossrefs

Cf. A358991 (number of zero digits), A358993 (number of nonzero digits).

Programs

  • Mathematica
    Table[Length[IntegerDigits[Product[2i+2Floor[(i-3)/4]+1, {i, n}]]], {n, 0, 65}]

Formula

a(n) = A055642(A358990(n)).

A358993 a(n) is the number of nonzero digits in the product of the first n odd numbers not divisible by 5.

Original entry on oeis.org

1, 1, 1, 2, 3, 3, 4, 6, 7, 9, 10, 12, 12, 13, 15, 18, 17, 20, 21, 22, 24, 25, 27, 29, 31, 32, 34, 34, 35, 40, 40, 45, 45, 45, 46, 47, 46, 52, 55, 55, 59, 58, 60, 59, 66, 66, 65, 69, 70, 74, 80, 79, 84, 75, 83, 90, 89, 87, 92, 95, 91, 95, 104, 98, 102, 110, 107
Offset: 0

Views

Author

Stefano Spezia, Dec 09 2022

Keywords

Crossrefs

Cf. A358991 (number of zero digits), A358992 (number of digits).

Programs

  • Mathematica
    Table[Length[Select[IntegerDigits[Product[2i+2Floor[(i-3)/4]+1, {i, n}]], Positive]], {n, 0, 66}]

Formula

a(n) = A055640(A358990(n)).

A364414 Numbers k with the property that the second part of the symmetric representation of sigma(k) is an octagon of width 1 and one of its vertices is also the central vertex of the first valley of the largest Dyck path of the diagram.

Original entry on oeis.org

21, 27, 33, 39, 51, 57, 63, 69, 81, 87, 93, 99, 111, 117, 123, 129, 141, 147, 153, 159, 171, 177, 183, 189, 201, 207, 213, 219, 231, 237, 243, 249, 261, 267, 273, 279, 291, 297, 303, 309, 321, 327, 333, 339, 351, 357
Offset: 1

Views

Author

Omar E. Pol, Jul 23 2023

Keywords

Comments

Conjecture 1: These are the numbers > 9 that are congruent to {3, 9, 21, 27} mod 30.
Conjecture 2: These are the terms > 9 of A016945 except the terms ending in 5.
Conjecture 3: The polygon mentioned in the definition is an "S"-shaped concave octagon.
Conjecture 4: Every term of this sequence has as nearest neighbor a term of A091999.
Conjecture 5: The terms of A091999 greater than 2 are the numbers k with the property that the first part of the symmetric representation of sigma(k) is an octagon.
Conjecture 6: The octagon mentioned in the definition shares at least an edge with the octagon mentioned in conjecture 5.
Also the row numbers of the triangle A364639 where the rows start with [0, 0, 1, 0, -1]. - Omar E. Pol, Aug 23 2023

Examples

			The symmetric representation of sigma(21) in the first quadrant looks like this:
   _ _ _ _ _ _ _ _ _ _ _
  |_ _ _ _ _ _ _ _ _ _ _|
                        |
                        |
                        |_ _ _
                        |_ _  |_
                            |_ _|_
                                | |_
                                |_  |
                                  | |
                                  |_|_ _ _ _
                                          | |
                                          | |
                                          | |
                                          | |
                                          | |
                                          | |
                                          | |
                                          | |
                                          | |
                                          | |
                                          |_|
.
Its second part is an octagon of width 1 and one of its vertices is also the central vertex of the first valley of the largest Dyck path of the structure, so 21 is in the sequence.
Note that 10 is not in the sequence because the second part of the symmetric representation of sigma(10) is an octagon of width 1 in accordance with the definition but none of its vertices is the central vertex of the first valley of the largest Dyck path of the diagram.
		

Crossrefs

A045801 1-ish numbers (end in 11, 39, 73, 77).

Original entry on oeis.org

11, 39, 73, 77, 111, 139, 173, 177, 211, 239, 273, 277, 311, 339, 373, 377, 411, 439, 473, 477, 511, 539, 573, 577, 611, 639, 673, 677, 711, 739, 773, 777, 811, 839, 873, 877, 911, 939, 973, 977, 1011, 1039, 1073, 1077, 1111, 1139, 1173, 1177, 1211, 1239
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    import Data.List (findIndices)
    a045801 n = a045801_list !! (n-1)
    a045801_list = findIndices (`elem` [11,39,73,77]) $ cycle [0..99]
    -- Reinhard Zumkeller, Jan 23 2012
  • Mathematica
    Table[100n+k,{n,0,20},{k,{11,39,73,77}}]//Flatten (* or *) LinearRecurrence[ {1,0,0,1,-1},{11,39,73,77,111},80] (* Harvey P. Dale, Jul 05 2019 *)

Formula

G.f.: x*(11+28*x+34*x^2+4*x^3+23*x^4)/(1-x-x^4+x^5). - Colin Barker, Jan 23 2012
a(n) = (50*n-12*i^(n*(n-1))-9*(-1)^n-25)/2, where i=sqrt(-1). - Bruno Berselli, Feb 23 2012

Extensions

More terms from Erich Friedman.
Previous Showing 41-50 of 77 results. Next