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

A119910 Period 6: repeat [1, 3, 2, -1, -3, -2].

Original entry on oeis.org

1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2
Offset: 1

Views

Author

Kartikeya Shandilya (kartikeya.shandilya(AT)gmail.com), May 28 2006

Keywords

Comments

Take any of term, multiply it to units place digit of any taken no. then save the product, then take the next term of this sequence, multiply it to the next place digit of the taken no., add the product to previous one and save it, then take the next term of the sequence, multiply it to the next place digit of the taken no. and add it to the previous sum, keep on doing this until all the digits of the taken no. are done, now if the calculated sum is divisible by 7, then the initial number taken must also be completely divisible by seven, otherwise not.
Can be converted into the sequence "10^n mod 7", 1) 1,3,2,6,4,5,1,3,2,6,4,5,1,3,2,6,4,5,1,3,2,6,4,5 .... 2) -6,-4,-5,6,4,5,-6,-4,-5,6,4,5,-6,-4,-5,6,4,5 ... 3) -6,-4,-5,-1,-3,-2,-6,-4,-5,-1,-3,-2,-6,-4,-5,-1,-3,-2 ...
Many variations can be made by adding or subtracting 7 from any term of the previous sequences. Still the divisibility rule will be valid.
Nonsimple continued fraction of (6+2*sqrt(2))/7 = 1.26120387... - R. J. Mathar, Mar 08 2012

Examples

			a(32)=?: 32%7=4, therefore a(32)=-1.
Let us test the divisibility of 342 with the series:
Take 1 from the sequence, multiply it by 2, the product is 2,
take 3 from the sequence, multiply it by 4, the product is 12,
take 2 from the sequence, multiply it by 3, the product is 6,
the sum of the products is 2 + 12 + 6 = 20,
because 20 is not divisible by 7, therefore 342 will also not be.
		

Crossrefs

Programs

Formula

From R. J. Mathar, Feb 08 2008: (Start)
O.g.f.: 2 + (3*x-2)/(x^2-x+1).
a(n) = 3*A010892(n-1) - 2*A010892(n).
a(n) = -a(n-3) for n>3. (End)
a(n) = a(n-1) - a(n-2) for n>2. - Philippe Deléham, Nov 16 2008
a(n) = (4*sqrt(3)*sin(n*Pi/3) - 6*cos(n*Pi/3))/3. - Wesley Ivan Hurt, Jun 19 2016

Extensions

New name from Omar E. Pol, Oct 31 2013

A201909 Irregular triangle of 3^k mod prime(n).

Original entry on oeis.org

1, 0, 1, 3, 4, 2, 1, 3, 2, 6, 4, 5, 1, 3, 9, 5, 4, 1, 3, 9, 1, 3, 9, 10, 13, 5, 15, 11, 16, 14, 8, 7, 4, 12, 2, 6, 1, 3, 9, 8, 5, 15, 7, 2, 6, 18, 16, 10, 11, 14, 4, 12, 17, 13, 1, 3, 9, 4, 12, 13, 16, 2, 6, 18, 8, 1, 3, 9, 27, 23, 11, 4, 12, 7, 21, 5, 15
Offset: 1

Views

Author

T. D. Noe, Dec 07 2011

Keywords

Comments

The row lengths are in A062117. Except for the second row, the first term of each row is 1. Many sequences are in this one: starting at A036119 (mod 17) and A070341 (mod 11).

Examples

			The first 9 rows are:
  1
  0
  1, 3, 4,  2
  1, 3, 2,  6,  4,  5
  1, 3, 9,  5,  4
  1, 3, 9
  1, 3, 9, 10, 13,  5, 15, 11, 16, 14,  8,  7,  4, 12, 2,  6
  1, 3, 9,  8,  5, 15,  7,  2,  6, 18, 16, 10, 11, 14, 4, 12, 17, 13
  1, 3, 9,  4, 12, 13, 16,  2,  6, 18,  8
		

Crossrefs

Cf. A062117, A201908 (2^k), A201910 (5^k), A201911 (7^k).
Cf. A070352 (5), A033940 (7), A070341 (11), A168399 (13), A036119 (17), A070342 (19), A070356 (23), A070344 (29), A036123 (31), A070346 (37), A070361 (41), A036126 (43), A070364 (47), A036134 (79), A036136 (89), A036142 (113), A036143 (127), A036145 (137), A036158 (199), A036160 (223).

Programs

  • GAP
    P:=Filtered([1..350],IsPrime);;
    R:=List([1..Length(P)],n->OrderMod(7,P[n]));;
    Flat(Concatenation([1,1,1,2,4,3,0],List([5..10],n->List([0..R[n]-1],k->PowerMod(7,k,P[n]))))); # Muniru A Asiru, Feb 01 2019
  • Mathematica
    nn = 10; p = 3; t = p^Range[0,Prime[nn]]; Flatten[Table[If[Mod[n, p] == 0, {0}, tm = Mod[t, n]; len = Position[tm, 1, 1, 2][[-1,1]]; Take[tm, len-1]], {n, Prime[Range[nn]]}]]

A271350 a(n) = 3^n mod 83.

Original entry on oeis.org

1, 3, 9, 27, 81, 77, 65, 29, 4, 12, 36, 25, 75, 59, 11, 33, 16, 48, 61, 17, 51, 70, 44, 49, 64, 26, 78, 68, 38, 31, 10, 30, 7, 21, 63, 23, 69, 41, 40, 37, 28, 1, 3, 9, 27, 81, 77, 65, 29, 4, 12, 36, 25, 75, 59, 11, 33, 16, 48, 61, 17, 51, 70, 44, 49, 64, 26
Offset: 0

Views

Author

Vincenzo Librandi, Apr 05 2016

Keywords

Crossrefs

Cf. similar sequences of the type 3^n mod p, where p is a prime: A070352 (5), A033940 (7), A070341 (11), A168399 (13), A036119 (17), A070342 (19), A070356 (23), A070344 (29), A036123 (31), A070346 (37), A070361 (41), A036126 (43), A070364 (47), A036134 (79), this sequence (83), A036136 (89), A036142 (113), A036143 (127), A271351 (131), A036145 (137), A036158 (199), A271352 (211), A036160 (223).

Programs

  • Magma
    [Modexp(3, n, 83): n in [0..100]];
    
  • Mathematica
    PowerMod[3, Range[0, 100], 83]
  • PARI
    a(n) = lift(Mod(3, 83)^n); \\ Altug Alkan, Apr 05 2016

Formula

a(n) = a(n-41).

A155751 A variation on 10^n mod 17.

Original entry on oeis.org

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

Views

Author

Ferruccio Guidi (fguidi(AT)cs.unibo.it), Jan 26 2009, Feb 08 2009

Keywords

Comments

This is 10^n mod 17, using values -8,-7,...,7,8 (instead of 0..16). - Don Reble, Sep 02 2017.
This sequence can be employed in a test for divisibility by 17 and works like A033940 works for 7.
The use of negative coefficients ensures the termination of the test because the modulus of the intermediate sum at each step of the test decreases strictly.
The test is successful if the final sum is 0.
The negative coefficients have the form (10^n mod 17) - 17 when 10^n mod 17 > 8.
Example: 9996 is divisible by 17 since |6*1 + 9*(-7) + 9*(-2) + 9*(-3)| = 102 and 2*1 + 0*(-7) + 1*(-2) = 0.

Crossrefs

Formula

a(n)= -a(n-8). G.f.:(1-7x-2x^2-3x^3+4x^4+6x^5-8x^6+5x^7)/(1+x^8). [From R. J. Mathar, Feb 13 2009]

A178247 Decimal expansion of (269+11*sqrt(1086))/490.

Original entry on oeis.org

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

Views

Author

Klaus Brockhaus, May 24 2010

Keywords

Comments

Continued fraction expansion of (269+11*sqrt(1086))/490 is A033940.

Examples

			(269+11*sqrt(1086))/490 = 1.28877480647397915221...
		

Crossrefs

Cf. A178230 (decimal expansion of sqrt(1086)), A033940 (repeat 1, 3, 2, 6, 4, 5).

Programs

  • Mathematica
    RealDigits[(269+11Sqrt[1086])/490,10,120][[1]] (* Harvey P. Dale, Mar 18 2022 *)

A155754 A variation on 10^n mod 19.

Original entry on oeis.org

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

Views

Author

Ferruccio Guidi (fguidi(AT)cs.unibo.it), Jan 26 2009

Keywords

Comments

This sequence can be employed in a test for divisibility by 19 and works like A033940 works for 7.
The use of negative coefficients ensures the termination of the test because the modulus of the intermediate sum at each step of the test decreases strictly.
The test is successful if the final sum is 0.
The negative coefficients have the form (10^n mod 19) - 19 when 10^n mod 19 > 9.
Example: 8284 is divisible by 19 since |4*1 + 8*(-9) + 2*5 + 8*(-7)| = 114 and 4*1 + 1*(-9) + 1*5 = 0.

Crossrefs

Formula

a(n) = -a(n-9). G.f.: (-2*x^8-4*x^7-8*x^6+3*x^5+6*x^4-7*x^3+5*x^2-9*x+1) / (x^9+1). [Colin Barker, Feb 14 2013]

A369562 Smallest positive n-digit number divisible by 7.

Original entry on oeis.org

7, 14, 105, 1001, 10003, 100002, 1000006, 10000004, 100000005, 1000000001, 10000000003, 100000000002, 1000000000006, 10000000000004, 100000000000005, 1000000000000001, 10000000000000003, 100000000000000002, 1000000000000000006, 10000000000000000004, 100000000000000000005
Offset: 1

Views

Author

J. Lowell, Jan 25 2024

Keywords

Comments

The only semiprime terms are a(2) = 14 and a(n) such that (10^(n-1) + 3)/7 is a prime. - Jon E. Schoenfield, Jan 27 2024

Examples

			a(3) = 105 = 7*15.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := 10^(n - 1) + {6, 4, 5, 1, 3, 2}[[Mod[n, 6, 1]]]; Array[a, 30]
    (* or *)
    LinearRecurrence[{11, -10, -1, 11, -10}, {7, 14, 105, 1001, 10003, 100002}, 30] (* Amiram Eldar, Jan 27 2024 *)
    Table[10^n+7-PowerMod[10,n,7],{n,0,20}] (* Harvey P. Dale, Jan 13 2025 *)

Formula

a(n) = (floor(10^(n-1)/7) + 1)*7.
a(n) = 10^(n-1) + A033940(n+2). - Amiram Eldar, Jan 27 2024
G.f.: 7*x*(1 - 9*x + 3*x^2 - x^3 - 3*x^4)/((1 - x)*(1 + x)*(1 - 10*x)*(1 - x + x^2)). - Stefano Spezia, Jan 28 2024
Showing 1-7 of 7 results.