Logging to /Users/s/tmp/pari-03.04 GPRC Done. GP/PARI CALCULATOR Version 2.13.0 (released) i386 running darwin (x86-64/GMP-6.2.0 kernel) 64-bit version compiled: Oct 31 2020, Apple clang version 12.0.0 (clang-1200.0.32.21) threading engine: single (readline v8.0 enabled, extended help enabled) Copyright (C) 2000-2020 The PARI Group PARI/GP is free software, covered by the GNU General Public License, and comes WITHOUT ANY WARRANTY WHATSOEVER. Type ? for help, \q to quit. Type ?17 for how to get moral (and possibly technical) support. parisizemax = 900001792, primelimit = 1000000 (13:04) gp > 1+2+3+4+5+6+7+8+9 %1 = 45 (13:04) gp > sum(i=1,9,i) %2 = 45 (13:04) gp > sum(i=1,99,i) %3 = 4950 (13:05) gp > factor(%) %4 = [ 2 1] [ 3 2] [ 5 2] [11 1] (13:05) gp > sum(i=1,100,i) %5 = 5050 (13:05) gp > factor(%) %6 = [ 2 1] [ 5 2] [101 1] (13:05) gp > %5/101 %7 = 50 (13:06) gp > sum(i=1,101,i) %8 = 5151 (13:06) gp > factor(%) %9 = [ 3 1] [ 17 1] [101 1] (13:06) gp > %8/101 %10 = 51 (13:06) gp > vector(20,i,sum(j=1,i,j)) %11 = [1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210] (13:07) gp > vector(20,i,log(sum(j=1,i,j))/log(i)) *** at top-level: ...or(20,i,log(sum(j=1,i,j))/log(i)) *** ^-------- *** _/_: impossible inverse in divrr: 0.E-38. *** Break loop: type 'break' to go back to GP prompt break> break (13:08) gp > vector(20,i,log(sum(j=1,i+1,j))/log(i+1)) %12 = [1.5849625007211561814537389439478165088, 1.6309297535714574370995271143427608543, 1.6609640474436811739351597147446950879, 1.6826061944859852951345663592710522530, 1.6991803252671502561157959124600004565, 1.7124143742160443530283541560025810586, 1.7233083338141041209691592959652110058, 1.7324867603589635835985202038393201982, 1.7403626894942438455364610765185312149, 1.7472217363092140817484292415930161851, 1.7532686095315830629575759049898084237, 1.7586544129592989946723315757897043072, 1.7634934633405680086030463938253411909, 1.7678740744294464681630330365944068112, 1.7718657103125848520635165027026010885, 1.7755238700769801508723987214688372937, 1.7788935082334041397579340671702059379, 1.7820114830995406860624100309155093081, 1.7849083437532688803035425551192954674, 1.7876096569652561262918785707679022945] (13:08) gp > vector(200,i,log(sum(j=1,i+1,j))/log(i+1)) %13 = [1.5849625007211561814537389439478165088, 1.6309297535714574370995271143427608543, 1.6609640474436811739351597147446950879, 1.6826061944859852951345663592710522530, 1.6991803252671502561157959124600004565, 1.7124143742160443530283541560025810586, 1.7233083338141041209691592959652110058, 1.7324867603589635835985202038393201982, 1.7403626894942438455364610765185312149, 1.7472217363092140817484292415930161851, 1.7532686095315830629575759049898084237, 1.7586544129592989946723315757897043072, 1.7634934633405680086030463938253411909, 1.7678740744294464681630330365944068112, 1.7718657103125848520635165027026010885, 1.7755238700769801508723987214688372937, 1.7788935082334041397579340671702059379, 1.7820114830995406860624100309155093081, 1.7849083437532688803035425551192954674, 1.7876096569652561262918785707679022945, 1.7901370078937850696159872270561015470, 1.7925087653372184697062155168348384616, 1.7947406743679130518008610319717868674, 1.7968463205835411448678436172650760014, 1.7988374976221232832361424970569444038, 1.8007245009109598990558184738084061908, 1.8025163645450815087192307440308939299, 1.8042210538754737026207063445924127712, 1.8058456232803990640564314404204114630, 1.8073963463283994028740656011756987300, 1.8088788238716906875306203981347218935, 1.8102980743642178681190638428702144924, 1.8116586097619767006451846462635948127, 1.8129644996516386767801116957966636243, 1.8142194257082242079023207634081162861, 1.8154267281612805129690337591958083178, 1.8165894456210300764091690865837061472, 1.8177103493587501565281444487171578064, 1.8187919729325674962129913321963554425, 1.8198366378884770657201119116767458769, 1.8208464761373714434848005054514801941, 1.8218234495051136065844765322091233219, 1.8227693668687922470077596452461490732, 1.8236858992241085360772167229031258318, 1.8245745929731409002058514800779842526, 1.8254368816760168343307565618010657739, 1.8262740964723282461856845213054116432, 1.8270874753469161503037514836455686189, 1.8278781713887001250216260214003149102, 1.8286472601695658001466190563783668093, 1.8293957463521725363159121731386721121, 1.8301245696202789948958091149440672158, 1.8308346100123025966609159448755931685, 1.8315266927279215366238128219190097624, 1.8322015924682626872002535062716836004, 1.8328600373623237948676688193957117978, 1.8335027125255310853299962539004464219, 1.8341302632905503331765476060678953164, 1.8347432981454990893261311764219358846, 1.8353423914104244607732026512260651142, 1.8359280856792100994156505430303283477, 1.8365008940508706748753569847287696378, 1.8370[+++] (13:08) gp > \p2 realprecision = 19 significant digits (2 digits displayed) (13:08) gp > vector(200,i,log(sum(j=1,i+1,j))/log(i+1)) %14 = [1.6, 1.6, 1.7, 1.7, 1.7, 1.7, 1.7, 1.7, 1.7, 1.7, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9] (13:08) gp > vector(20,n,sum(j=1,n,i)-n^2/2) %15 = [i - 1/2, 2*i - 2, 3*i - 9/2, 4*i - 8, 5*i - 25/2, 6*i - 18, 7*i - 49/2, 8*i - 32, 9*i - 81/2, 10*i - 50, 11*i - 121/2, 12*i - 72, 13*i - 169/2, 14*i - 98, 15*i - 225/2, 16*i - 128, 17*i - 289/2, 18*i - 162, 19*i - 361/2, 20*i - 200] (13:11) gp > vector(20,n,sum(i=1,n,i)-n^2/2) %16 = [1/2, 1, 3/2, 2, 5/2, 3, 7/2, 4, 9/2, 5, 11/2, 6, 13/2, 7, 15/2, 8, 17/2, 9, 19/2, 10] (13:11) gp > vector(20,n,sum(i=1,n,i)-n^2/2)*2 %17 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] (13:11) gp > vector(20,n,n*(n+1)/2) %18 = [1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210] (13:11) gp > vector(20,n,sum(i=1,n,i)) %19 = [1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210] (13:11) gp > vector(20,n,sum(i=1,n,i)-n*(n+1)/2) %20 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] (13:11) gp > vector(10,n,sum(i=1,n,i^2)) %21 = [1, 5, 14, 30, 55, 91, 140, 204, 285, 385] (13:49) gp > vector(10,n,a*n^2+b*n+c) %22 = [a + (b + c), 4*a + (2*b + c), 9*a + (3*b + c), 16*a + (4*b + c), 25*a + (5*b + c), 36*a + (6*b + c), 49*a + (7*b + c), 64*a + (8*b + c), 81*a + (9*b + c), 100*a + (10*b + c)] (13:50) gp > matrix(3,3,i,j,polcoeff(%22[i],1,[a,b,c][j])) %23 = [1 1 1] [4 2 1] [9 3 1] (13:52) gp > M=matrix(3,3,i,j,polcoeff(%22[i],1,[a,b,c][j])) %24 = [1 1 1] [4 2 1] [9 3 1] (13:53) gp > B=vectorv(3,n,sum(i=1,n,i^2)) %25 = [1, 5, 14]~ (13:53) gp > matsolve(M,B) %26 = [5/2, -7/2, 2]~ (13:53) gp > [a,b,c]=matsolve(M,B) %27 = [5/2, -7/2, 2]~ (13:53) gp > vector(10,n,a*n^2+b*n+c) %28 = [1, 5, 14, 28, 47, 71, 100, 134, 173, 217] (13:53) gp > vectorv(10,n,sum(i=1,n,i^2)) %29 = [1, 5, 14, 30, 55, 91, 140, 204, 285, 385]~ (13:54) gp > g2(n)=a*n^2+b*n+c %30 = (n)->a*n^2+b*n+c (13:54) gp > vectorv(10,n,sum(i=1,n,i^2)-g2(n)) %31 = [0, 0, 0, 2, 8, 20, 40, 70, 112, 168]~ (13:54) gp > vector(4,n,a*n^3+b*^2+c*n+d) *** syntax error, unexpected '^': vector(4,n,a*n^3+b* *** ^2+c*n+d) *** ^--------- (13:55) gp > vector(4,n,a*n^3+b*n^2+c*n+d) %32 = [d + 1, d + 10, d + 42, d + 112] (13:55) gp > kill(a,b,c) *** too many arguments: kill(a,b,c) *** ^---- (13:55) gp > kill(a);kill(b);kill(c) (13:55) gp > vector(4,n,a*n^3+b*n^2+c*n+d) %34 = [d + (a + (b + c)), d + (8*a + (4*b + 2*c)), d + (27*a + (9*b + 3*c)), d + (64*a + (16*b + 4*c))] (13:55) gp > M=matrix(4,4,i,j,i^j) %35 = [1 1 1 1] [2 4 8 16] [3 9 27 81] [4 16 64 256] (13:56) gp > M=matrix(4,4,i,j,i^(4-j)) %36 = [ 1 1 1 1] [ 8 4 2 1] [27 9 3 1] [64 16 4 1] (13:56) gp > B=vectorv(4,n,sum(i=1,n,i^2)) %37 = [1, 5, 14, 30]~ (13:56) gp > matsolve(M,B) %38 = [1/3, 1/2, 1/6, 0]~ (13:57) gp > [n^3,n^2,n,1]*matsolve(M,B) %39 = 1/3*n^3 + 1/2*n^2 + 1/6*n (13:57) gp > g2(n)=[n^3,n^2,n,1]*matsolve(M,B) %40 = (n)->[n^3,n^2,n,1]*matsolve(M,B) (13:57) gp > vector(10,n,g2(n)) %41 = [1, 5, 14, 30, 55, 91, 140, 204, 285, 385] (13:58) gp > vector(10,n,sum(i=1,n,i^2)) %42 = [1, 5, 14, 30, 55, 91, 140, 204, 285, 385] (13:58) gp > vector(10,n,sum(i=1,n,i^2)-g2(n)) %43 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] (13:58) gp > g2 %44 = (n)->[n^3,n^2,n,1]*matsolve(M,B) (13:58) gp > g2(n) %45 = 1/3*n^3 + 1/2*n^2 + 1/6*n (13:58) gp > factor(%) %46 = [ n 1] [ n + 1 1] [2*n + 1 1] (13:58) gp > n*(n+1)*(2*n+1)/3 %47 = 2/3*n^3 + n^2 + 1/3*n (13:58) gp > n*(n+1)*(2*n+1)/3-g2(n) %48 = 1/3*n^3 + 1/2*n^2 + 1/6*n (13:58) gp > n*(n+1)*(2*n+1)/6-g2(n) %49 = 0